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
Jonathan Reissmueller
created issue -
Jonathan Reissmueller
made changes -
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Sprint | 5.9.0 Sprint 4 [ 187 ] |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Abdy Franco
made changes -
Assignee | Abdy Franco [ abdy ] |
Abdy Franco
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Abdy Franco
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 30 minutes [ 1800 ] | |
Worklog Id | 16639 [ 16639 ] |
Abdy Franco
made changes -
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Jonathan Reissmueller
made changes -
Status | In Review [ 5 ] | Closed [ 6 ] |