mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-24 22:04:27 +01:00
Update commande.class.php (#37301)
the empty qty logic → special_code = 3 ("Option" line) is not respected, unlike Propal which works correctly.
This commit is contained in:
@@ -1789,6 +1789,9 @@ class Commande extends CommonOrder
|
||||
$this->line->total_localtax2 = (float) $total_localtax2;
|
||||
$this->line->total_ttc = (float) $total_ttc;
|
||||
$this->line->special_code = $special_code;
|
||||
if (empty($qty) && empty($special_code)) {
|
||||
$this->line->special_code = 3;
|
||||
}
|
||||
$this->line->origin = $origin;
|
||||
$this->line->origin_id = $origin_id;
|
||||
$this->line->fk_parent_line = $fk_parent_line;
|
||||
@@ -3150,8 +3153,11 @@ class Commande extends CommonOrder
|
||||
if (empty($remise_percent)) {
|
||||
$remise_percent = 0;
|
||||
}
|
||||
if (empty($special_code) || $special_code == 3) {
|
||||
$special_code = 0;
|
||||
if (empty($qty) && empty($special_code)) {
|
||||
$special_code = 3; // Set option tag
|
||||
}
|
||||
if (!empty($qty) && $special_code == 3) {
|
||||
$special_code = 0; // Remove option tag
|
||||
}
|
||||
if (empty($ref_ext)) {
|
||||
$ref_ext = '';
|
||||
|
||||
Reference in New Issue
Block a user