Make purchased date on /stockedit editable / Dirty workaround for 2 datetimepickers on the same page (references #506)

This commit is contained in:
Bernd Bestel
2020-01-23 18:58:05 +01:00
parent 3baffcfe7b
commit 99d4b05a3c
7 changed files with 385 additions and 15 deletions

View File

@@ -563,7 +563,7 @@ class StockService extends BaseService
return $this->Database->lastInsertId();
}
public function EditStockEntry(int $stockRowId, int $amount, $bestBeforeDate, $locationId, $price, $open)
public function EditStockEntry(int $stockRowId, int $amount, $bestBeforeDate, $locationId, $price, $open, $purchasedDate)
{
$stockRow = $this->Database->stock()->where('id = :1', $stockRowId)->fetch();
@@ -607,7 +607,8 @@ class StockService extends BaseService
'best_before_date' => $bestBeforeDate,
'location_id' => $locationId,
'opened_date' => $openedDate,
'open' => $open
'open' => $open,
'purchased_date' => $purchasedDate
));
$logNewRowForStockUpdate = $this->Database->stock_log()->createRow(array(