Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
This commit is contained in:
commit
bc0993d6cd
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -143,7 +144,7 @@ if ($action == 'initbarcodeproducts')
|
||||
$nextvalue=$modBarCodeProduct->getNextValue($productstatic,'');
|
||||
|
||||
//print 'Set value '.$nextvalue.' to product '.$productstatic->id." ".$productstatic->ref." ".$productstatic->type."<br>\n";
|
||||
$result=$productstatic->setValueFrom('barcode', $nextvalue, '', '', 'date', '', $user, 'PRODUCT_MODIFY');
|
||||
$result=$productstatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'PRODUCT_MODIFY');
|
||||
|
||||
$nbtry++;
|
||||
if ($result > 0) $nbok++;
|
||||
|
||||
@ -557,6 +557,15 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
|
||||
$newinvoiceline->fk_parent_line=$fk_parent_line;
|
||||
|
||||
if($this->type === Facture::TYPE_REPLACEMENT && $newinvoiceline->fk_remise_except){
|
||||
$discount = new DiscountAbsolute($this->db);
|
||||
$discount->fetch($newinvoiceline->fk_remise_except);
|
||||
|
||||
$discountId = $soc->set_remise_except($discount->amount_ht, $user, $discount->description, $discount->tva_tx);
|
||||
$newinvoiceline->fk_remise_except = $discountId;
|
||||
}
|
||||
|
||||
$result=$newinvoiceline->insert();
|
||||
|
||||
// Defined the new fk_parent_line
|
||||
|
||||
Loading…
Reference in New Issue
Block a user