mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-18 14:48:42 -05:00
Fixed failures in updated rows in Suppliers and Report Detailed Receivings (#683)
This commit is contained in:
@@ -16,6 +16,16 @@ class Suppliers extends Persons
|
||||
$this->load->view('people/manage', $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Gets one row for a supplier manage table. This is called using AJAX to update one row.
|
||||
*/
|
||||
public function get_row($row_id)
|
||||
{
|
||||
$data_row = $this->xss_clean(get_supplier_data_row($this->Supplier->get_info($row_id), $this));
|
||||
|
||||
echo json_encode($data_row);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns Supplier table data rows. This will be called with AJAX.
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ class Detailed_receivings extends Report
|
||||
|
||||
public function getDataByReceivingId($receiving_id)
|
||||
{
|
||||
$this->db->select('receiving_id, DATE_FORMAT(receiving_date, "%d-%m-%Y") AS receiving_date, SUM(quantity_purchased) AS items_purchased, CONCAT(employee.first_name, " ", employee.last_name) AS employee_name, suppliers.company_name AS supplier_name, SUM(subtotal) AS subtotal, SUM(total) AS total, SUM(profit) AS profit, payment_type, comment, reference');
|
||||
$this->db->select('receiving_id, DATE_FORMAT(receiving_date, "%d-%m-%Y") AS receiving_date, SUM(quantity_purchased) AS items_purchased, CONCAT(employee.first_name, " ", employee.last_name) AS employee_name, supplier.company_name AS supplier_name, SUM(subtotal) AS subtotal, SUM(total) AS total, SUM(profit) AS profit, payment_type, comment, reference');
|
||||
$this->db->from('receivings_items_temp');
|
||||
$this->db->join('people AS employee', 'receivings_items_temp.employee_id = employee.person_id');
|
||||
$this->db->join('suppliers AS supplier', 'receivings_items_temp.supplier_id = supplier.person_id', 'left');
|
||||
|
||||
Reference in New Issue
Block a user