update reception class and card
This commit is contained in:
parent
7361941420
commit
14bcb124fe
@ -366,7 +366,7 @@ if (empty($reshook)) {
|
||||
$eatbydate = str_replace('/', '-', $eatby);
|
||||
$sellbydate = str_replace('/', '-', $sellby);
|
||||
if (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) {
|
||||
$ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), GETPOST($qty, 'int'), $array_options[$i], GETPOST($comment, 'alpha'), strtotime($eatbydate), strtotime($sellbydate), GETPOST($batch, 'alpha'), GETPOST($cost_price, 'double'));
|
||||
$ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), GETPOST($qty, 'int'), $array_options[$i], GETPOST($comment, 'alpha'), strtotime($eatbydate), strtotime($sellbydate), GETPOST($batch, 'alpha'), price2num(GETPOST($cost_price, 'double'), 'MU'));
|
||||
} else {
|
||||
$ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), GETPOST($qty, 'int'), $array_options[$i], GETPOST($comment, 'alpha'), strtotime($eatbydate), strtotime($sellbydate), GETPOST($batch, 'alpha'));
|
||||
}
|
||||
|
||||
@ -562,9 +562,7 @@ class Reception extends CommonObject
|
||||
$sql = "SELECT cd.fk_product, cd.subprice,";
|
||||
$sql .= " ed.rowid, ed.qty, ed.fk_entrepot,";
|
||||
$sql .= " ed.eatby, ed.sellby, ed.batch";
|
||||
if (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION || $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) {
|
||||
$sql .= ", ed.cost_price";
|
||||
}
|
||||
$sql .= ", ed.cost_price";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as ed";
|
||||
$sql .= " WHERE ed.fk_reception = ".((int) $this->id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user