Classe methods: remove reducdancy
This commit is contained in:
@@ -84,7 +84,7 @@ class BarcodeManager {
|
||||
$warehouses->execute([':company_id' => $this->company_id]);
|
||||
|
||||
foreach ($warehouses->fetchAll(PDO::FETCH_COLUMN) as $warehouse_id) {
|
||||
$table = $this->stockTableName((int)$warehouse_id);
|
||||
$table = 'td_stock_' . (int)$warehouse_id;
|
||||
$sth = $this->pdo->prepare(
|
||||
"SELECT lot_number
|
||||
FROM `{$table}`
|
||||
@@ -169,7 +169,7 @@ class BarcodeManager {
|
||||
$warehouses->execute([':company_id' => $this->company_id]);
|
||||
|
||||
foreach ($warehouses->fetchAll(PDO::FETCH_COLUMN) as $warehouse_id) {
|
||||
$table = $this->stockTableName((int)$warehouse_id);
|
||||
$table = 'td_stock_' . (int)$warehouse_id;
|
||||
$sth = $this->pdo->prepare(
|
||||
"SELECT ROUND(SUM(COALESCE(`in`, 0)) - SUM(COALESCE(`out`, 0)), 2) AS balance
|
||||
FROM `{$table}`
|
||||
|
||||
Reference in New Issue
Block a user