Merge pull request #7835 from ptibogxiv/patch-3

Fix import date
This commit is contained in:
Laurent Destailleur 2017-11-22 11:23:35 +01:00 committed by GitHub
commit 7c3dcc076a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -962,6 +962,7 @@ class Facture extends CommonInvoice
* @param User $user Object user
* @return int <0 if KO, 0 if nothing done, 1 if OK
*/
function createFromOrder($object, User $user)
{
global $hookmanager;
@ -1000,7 +1001,9 @@ class Facture extends CommonInvoice
$line->special_code = $object->lines[$i]->special_code;
$line->fk_parent_line = $object->lines[$i]->fk_parent_line;
$line->fk_unit = $object->lines[$i]->fk_unit;
$line->date_start = $object->lines[$i]->date_start;
+ $line->date_end = $object->lines[$i]->date_end;
$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];