Question: New Version Cant Open Attachment File On Purchase

New Version Cant Open Attachment File On Purchase

Hello, after i updated my SMA to latest version i got this error whenever im trying to view my attachment files.

EH

Einnlleinhatt Ha

Asked
Hello, after i updated my SMA to latest version i got this error whenever im trying to view my attachment files.
  • MS

    Mian Saleem

    Answered
    Hello,

    Yes, the attachments are saved in different table now. I will fix this in next update.

    If you need it urgent, you can replace the `attachment` function in the `themes/default/admin/assets/js/core.js` around line 1132 from

    ```javascript
    function attachment(x) {
    return x == null ? '' : '<div class="text-center"><i class="fa fa-check"></i></div>';
    }
    ```

    to

    ```javascript
    function attachment(x) {
    return x == null || x == 0
    ? ''
    : x == 1
    ? '<div class="text-center"><i class="fa fa-check"></i></div>'
    : '<div class="text-center"><a href="' +
    site.base_url +
    'welcome/download/' +
    x +
    '" class="tip" title="' +
    lang.download +
    '"><i class="fa fa-file"></i></a></div>';
    }
    ```

    Thank you
  • EH

    Einnlleinhatt Ha

    Answered
    **[Mian Saleem](/u/saleem)** Sorry, forgot to mention about the checkmark icon. When there is no file attached the checkmark icon still show, not sure its bug or what.
  • MS

    Mian Saleem

    Answered
    Hello,

    The Icon is fixed yesterday and should not display if there is no attachment.

    Thank you
  • Login to Reply