From 055397a94b885598f41c17bddeea2aa5add3439e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Aug 2014 15:12:27 +0200 Subject: [PATCH] New: Can attach supplier order to a customer order. --- ChangeLog | 1 + htdocs/fourn/facture/fiche.php | 70 ++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/ChangeLog b/ChangeLog index f029f7d8aae..bbfdf2e114f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.7 compared to 3.6.* ***** For users: +- New: Can attach supplier order to a customer order. - New: Supervisor is now visible into user list. - New: Add user of creation and validation on invoice export. - New: Add info page about browser. diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 9c862bc5791..b73d17c8d2b 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -804,6 +804,13 @@ elseif ($action == 'reopen' && $user->rights->fournisseur->facture->creer) } } +// Link invoice to order +if (GETPOST('linkedOrder')) { + $object->fetch($id); + $object->fetch_thirdparty(); + $result = $object->add_object_linked('commande', GETPOST('linkedOrder')); +} + // Add file in email form if (GETPOST('addfile')) { @@ -2233,6 +2240,69 @@ else */ $somethingshown=$object->showLinkedObjectBlock(); + if (empty($somethingshown) && ! empty($conf->fournisseur->enabled)) + { + print '
' . $langs->trans('LinkedOrder') . ''; + + print ' + + '; + + print ''; + } + print '
'; //print ''; //print '
';