Announcement

Collapse
No announcement yet.

Strange error in sales pack prevents to create invoice

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange error in sales pack prevents to create invoice

    We have a strange problem in Sales Pack, which occurred suddenly in a before working environment.

    Configuration:
    espoCRM 8.06
    Sales Pack 1.19
    All folder permissions set correctly
    PHP version 8.12
    espoCRM runs in a Virtual Machine with nginx server

    We use the default way to write a Quote, from there by activating the Sales Order by clicking the + symbol in the bottom panel (linked field). This works as expected, the Sales Order is created and all field content is transferred from Quote.

    Then we do the same from Sales Order to Invoice by clicking the + symbol in Sales Order to create the Invoice.
    On saving we get the known error for field validation, mentioning, that the field salesOrder (in invoice) is not validated.

    When I look into the entity invoice (Administrator GUI), there is the relationship set (by Sales Pack) from salesOrder to Invoice, the field salesOrder is present in the fields-list.
    But this field does not exist in the invoice.json.

    Then I disabled "mandatory" for that field and the error disappeared. Although I know, that the error message disappears, does not mean that the error itself disappeared, what obviously is the fact.
    But now on saving the invoice I get the message on top: invoice created.
    Nonetheless the invoice is not created actually and the bottom panel link field in Sales Order stays empty.
    In the invoice list there is the invoice, but it did not pull any values from the Sales Order.

    I conclude, that by any error the link between Invoice and Sales Order is not created. In the salesOrder.json there is no link salesOrderInvoice.

    Well we thought, that it could help to install the most recent version of Sales Pack. But trying to deinstall the former version or installing the latest version, we get "permission error" and are not allowed to install nor to deinstall the extension.
    We don`t know, if that has to do with the former described error, but it occurred together.

    The system ran correctly until 10th of december, from 11th of december the error appeared the first time. We could confirm that by testing the daily backups.
    We have no hints in espoCRM log nor in the nginx logs.​

  • #2
    As I spent a lot of time to solve this, I today compared my Sales Pack entities with those in the espoCRM Demo. My client had set the link field salesOrder to read only. When I disabled readOnly ist got back to work as desired.
    I would recommend from the espoCRM/developer side to make the readOnly field in the link field salesOrder in the entity invoice not editable to avoid that any admin could configure it to readOnly.

    The permission error in uploading an extension persists.

    Comment


    • #3
      We already have a tooltip explaining what will happen by making the link field read-only. It's an expected behavior and actual for any link, link-parent, link-multiple fields.

      Comment


      • yuri
        yuri commented
        Editing a comment
        From v8.1, the plus [+] button will be automatically hidden if the link is read-only.

    • #4
      yuri, even after having worked a few years already with espocrm, seems to be clever to read the tooltips again. I am used to "ignore" them, as I normally know, what a field is for. Did not see that hint in this tooltip. Thanks for advising, will be one more place to look at, when something does not work.
      Thanks anyway.

      Comment


      • #5
        Originally posted by shalmaxb View Post
        The permission error in uploading an extension persists.
        As for removing the extension, you can try to remove it through the CLI:
        Code:
        php command.php extension -u --name="Sales Pack"
        You can delete by id (id can be found in your instance database, in the extension table):
        Code:
        php command.php extension -u --id="extension-ID"

        More about this: https://docs.espocrm.com/administrat...nds/#extension.
        Last edited by victor; 12-15-2023, 03:00 PM.

        Comment


        • shalmaxb
          shalmaxb commented
          Editing a comment
          Thank you, I will try that
      Working...
      X