mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-23 00:34:45 -04:00
Resolves Item view and Takings view issues that odiea spotted.
This commit is contained in:
1 parent
dd6bd1cf11
commit
dc638c74b5
2 files changed
+3
-3
No files matched your search
@@ -102,7 +102,7 @@ class Item extends CI_Model
|
||||
if($filters['stock_location_id'] > -1) {
|
||||
$this->db->select('max(item_quantities.item_id) as qty_item_id');
|
||||
$this->db->select('max(item_quantities.location_id) as location_id');
|
||||
$this->db->select('sum(item_quantities.quantity) as quantity');
|
||||
$this->db->select('max(item_quantities.quantity) as quantity');
|
||||
}
|
||||
|
||||
$this->db->from('items as items');
|
||||
|
||||
@@ -163,8 +163,8 @@ class Sale extends CI_Model
|
||||
ROUND($sale_cost, $decimals) AS cost,
|
||||
ROUND($sale_total - IFNULL($sale_tax, 0) - $sale_cost, $decimals) AS profit,
|
||||
IFNULL(ROUND($sale_total, $decimals), ROUND($sale_subtotal, $decimals)) AS amount_due,
|
||||
SUM(payments.sale_payment_amount) AS amount_tendered,
|
||||
(SUM(payments.sale_payment_amount) - IFNULL(ROUND($sale_total, $decimals), ROUND($sale_subtotal, $decimals))) AS change_due,
|
||||
MAX(payments.sale_payment_amount) AS amount_tendered,
|
||||
(MAX(payments.sale_payment_amount) - IFNULL(ROUND($sale_total, $decimals), ROUND($sale_subtotal, $decimals))) AS change_due,
|
||||
" . '
|
||||
MAX(payments.payment_type) AS payment_type
|
||||
');
|
||||
|
||||
Reference in new issue
Block a user