diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 10b01316bf09a..f5831f975a89a 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -976,6 +976,7 @@ $result = $object->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $alldate_start, $alldate_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); } } + $object->fetch($id); } elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '' && $usercancreate) { // Define a vat_rate for all lines $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); @@ -985,6 +986,7 @@ foreach ($object->lines as $line) { $result = $object->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); } + $object->fetch($id); } elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('remiseforalllines', 'alpha') !== '' && $usercancreate) { // Define a discount for all lines $remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0); @@ -1027,6 +1029,7 @@ $line->subprice = (float) $subprice; $line->multicurrency_subprice = $multicurrency_subprice; } + $object->fetch($id); } elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && !GETPOST('submitforallmargins', 'alpha') && $usercancreate) { // Add line // Set if we used free entry or predefined product $predef = '';