Skip to content

Commit

Permalink
Merge pull request #1187 from altatof/3.4
Browse files Browse the repository at this point in the history
Fix retrieving of margin info when invoice created automatically from order.
  • Loading branch information
eldy committed Aug 21, 2013
2 parents 7e27b9f + dd32dba commit 5ca7820
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions htdocs/compta/facture/class/facture.class.php
Expand Up @@ -695,6 +695,10 @@ function createFromOrder($object)
$line->special_code = $object->lines[$i]->special_code;
$line->fk_parent_line = $object->lines[$i]->fk_parent_line;

$line->fk_fournprice = $object->lines[$i]->fk_fournprice;
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
$line->pa_ht = $marginInfos[0];

$this->lines[$i] = $line;
}

Expand Down

0 comments on commit 5ca7820

Please sign in to comment.