Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.9.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      To reproduce:

      • Visit any invoices widget
      • Submit an invoice number filter
      • See the results don't change
      • See a new error in the log

      Possible solution

      In app/models/invoices.php in the getInvoices() method change

                  $fields = ['invoices.*'];
      

      To

                  $fields = ['invoices.*', 'REPLACE(invoices.id_format, ?, invoices.id_value)' => 'id_code'];
      

      Change

                  $this->Record->select(['invoices.total-IFNULL(invoices.paid,0)' => 'due'], false)
                      ->appendValues(
                          [
                              $this->replacement_keys['invoices']['ID_VALUE_TAG'],
                              $this->replacement_keys['clients']['ID_VALUE_TAG']
                          ]
                      );
      

      To

                  $this->Record->select(['invoices.total-IFNULL(invoices.paid,0)' => 'due'], false)
                      ->appendValues(
                          [
                              $this->replacement_keys['clients']['ID_VALUE_TAG']
                          ]
                      );
      

      Change

              // Filter on invoice number
              if (!empty($filters['invoice_number'])) {
                  $this->Record->having('id_code', '=', $filters['invoice_number']);
              }
      

      To

              // Filter on invoice number
              if (!empty($filters['invoice_number'])) {
                  $this->Record->having('id_code', 'like', '%' . $filters['invoice_number'] . '%');
              }
      

        Activity

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Dec/23

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 30 minutes
              30m

                Agile