Skip to content

Commit

Permalink
Added support for thirdparty-defined discounts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgdf committed Dec 19, 2015
1 parent 1720a18 commit 32b7341
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion importorderlines/class/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ public static function addOrderLine(Commande $object, Product $prod, $qty)
if ($tva_npr)
$info_bits |= 0x01;

//Percent remise
if (! empty($object->client->remise_percent)) {
$percent_remise = $object->client->remise_percent;
} else {
$percent_remise=0;
}

// Insert line
$result = $object->addline(
$desc,
Expand All @@ -213,7 +220,7 @@ public static function addOrderLine(Commande $object, Product $prod, $qty)
$localtax1_tx,
$localtax2_tx,
$prod->id,
0,
$percent_remise,
$info_bits,
0,
$price_base_type,
Expand Down

0 comments on commit 32b7341

Please sign in to comment.