Skip to content

Commit

Permalink
Merge pull request #8713 from atm-greg/Fix_supplierinvoice_line_Rank_…
Browse files Browse the repository at this point in the history
…handling

FIX addline on invoice supplier manage rank on its own if not provided
  • Loading branch information
eldy committed May 2, 2018
2 parents 5c024ce + 942e2f4 commit f3003fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions htdocs/fourn/class/fournisseur.facture.class.php
Expand Up @@ -1383,6 +1383,11 @@ public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $f
if (empty($txlocaltax1)) $txlocaltax1=0;
if (empty($txlocaltax2)) $txlocaltax2=0;

if ($rang < 0) {
$rangmax = $this->line_max();
$rang = $rangmax + 1;
}

$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty);

// Clean vat code
Expand Down

0 comments on commit f3003fa

Please sign in to comment.