From 1f503948a81a45a080f6c9726e1a650cc65018a8 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Tue, 17 Sep 2013 10:15:24 +0200 Subject: [PATCH 01/19] Update llx_societe.sql add outstanding value --- htdocs/install/mysql/tables/llx_societe.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 9348ab3b6d5..a7004844352 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -85,6 +85,7 @@ create table llx_societe barcode varchar(255), -- barcode fk_barcode_type integer NULL DEFAULT 0, -- barcode type price_level integer NULL, -- level of price for multiprices + outstanding double(24,8) DEFAULT 0, default_lang varchar(6), -- default language logo varchar(255), canvas varchar(32), -- type of canvas if used (null by default) From 7e9fb00f113717b8183aa128cbe0422f64872648 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Tue, 17 Sep 2013 10:27:02 +0200 Subject: [PATCH 02/19] Update fiche.php --- htdocs/comm/fiche.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 9021ad0acaf..8593e0b0aa5 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -128,6 +128,14 @@ if ($action == 'cstc') if ($result < 0) setEventMessage($object->error,'errors'); } +// Update communication level +if ($action == 'setOutstandingBill') +{ + $object->fetch($id); + $object->stcomm_id=GETPOST('OutstandingBill'); + $result=$object->set_OutstandingBill($user); + if ($result < 0) setEventMessage($object->error,'errors'); +} /* @@ -369,6 +377,18 @@ if ($id > 0) print ''; print ''; + if ($object->client) + { + print ''; + print ''; + print $form->editfieldkey("OutstandingBill",'OutstandingBill',$object->outstanding,$object,$user->rights->societe->creer); + print ''; + print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding,$object,$user->rights->societe->creer); + print ''; + print ''; + } + + // Multiprice level if (! empty($conf->global->PRODUIT_MULTIPRICES)) { @@ -898,4 +918,4 @@ dol_htmloutput_mesg('',$mesgs); // End of page llxFooter(); $db->close(); -?> \ No newline at end of file +?> From 4a2ef0810d3891867a52faa65ecfaf71d06494a1 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Tue, 17 Sep 2013 10:33:47 +0200 Subject: [PATCH 03/19] Update societe.class.php --- htdocs/societe/class/societe.class.php | 41 +++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index bd1fae497f2..811c2c55e4d 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -126,6 +126,7 @@ class Societe extends CommonObject var $statut_commercial; var $price_level; + var $outstanding; var $datec; var $date_update; @@ -710,7 +711,7 @@ class Societe extends CommonObject $sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode'; $sql .= ', s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj'; $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax2_assuj, s.fk_prospectlevel, s.default_lang, s.logo'; - $sql .= ', s.import_key, s.canvas'; + $sql .= ', s.outstanding, s.import_key, s.canvas'; $sql .= ', fj.libelle as forme_juridique'; $sql .= ', e.libelle as effectif'; $sql .= ', p.code as country_code, p.libelle as country'; @@ -840,6 +841,8 @@ class Societe extends CommonObject $this->default_lang = $obj->default_lang; $this->logo = $obj->logo; + $this->outstanding = $obj->outstanding; + // multiprix $this->price_level = $obj->price_level; @@ -2740,6 +2743,42 @@ class Societe extends CommonObject } } + /** + * Set outstanding value + * + * @param User $user User making change + * @return int <0 if KO, >0 if OK + */ + function set_outstanding($user) + { + if ($this->id) + { + $this->db->begin(); + + $now=dol_now(); + + $outstanding = price2num($this->outstanding); + + // Positionne l'encours de facturaiton + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET "; + $sql.= " outstanding=".$outstanding; + $sql.= " WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::set_outstanding sql=".$sql); + $resql=$this->db->query($sql); + if (! $resql) + { + $this->db->rollback(); + $this->error=$this->db->error(); + return -1; + } + + $this->db->commit(); + return 1; + } + } + + /** * Return label of status customer is prospect/customer * From 1e34bc26bcc3092b5a2303e6398621bfe520f9fc Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Tue, 17 Sep 2013 10:35:41 +0200 Subject: [PATCH 04/19] Update companies.lang --- htdocs/langs/fr_FR/companies.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 9848d21ec61..982a39ba36a 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -395,7 +395,7 @@ InActivity=En activité ActivityCeased=Clos ActivityStateFilter=Statut d'activité ProductsIntoElements=Liste des produits dans les %s - +OutstandingBill=Encours de facturation # Monkey MonkeyNumRefModelDesc=Renvoie le numéro sous la forme %syymm-nnnn pour les codes clients et %syymm-nnnn pour les codes fournisseurs où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0. # Leopard From a6335c44feecd46de8d6436dc603a3fc480d7684 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Tue, 17 Sep 2013 10:36:21 +0200 Subject: [PATCH 05/19] Update companies.lang --- htdocs/langs/en_US/companies.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 75f98701fe3..bff2a149211 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -395,7 +395,7 @@ InActivity=Open ActivityCeased=Closed ActivityStateFilter=Activity status ProductsIntoElements=List of products into - +OutstandingBill=Outstanding Bill # Monkey MonkeyNumRefModelDesc=Return numero with format %syymm-nnnn for customer code and %syymm-nnnn for supplier code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. # Leopard From 14e96f5c1bc3ac1f2105c0026b57c1521c5161ce Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Tue, 17 Sep 2013 10:39:30 +0200 Subject: [PATCH 06/19] Update 3.4.0-3.5.0.sql --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 2c3542a777d..60f18dafcdd 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -294,3 +294,5 @@ ALTER TABLE llx_facture_fourn ADD fk_mode_reglement integer NULL AFTER fk_cond_r ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_mode_reglement integer NULL; ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_cond_reglement integer NULL; +-- add outstanding bill +ALTER TABLE llx_societe ADD outstanding double(24,8) 0 AFTER mode_reglement_supplier; From 9e3a98da0d3e0e86fbeaf09ad00da1cc1e08b88b Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Fri, 27 Sep 2013 21:58:15 +0200 Subject: [PATCH 07/19] Update fiche.php --- htdocs/comm/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 8593e0b0aa5..7752b9c4606 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -132,7 +132,7 @@ if ($action == 'cstc') if ($action == 'setOutstandingBill') { $object->fetch($id); - $object->stcomm_id=GETPOST('OutstandingBill'); + $object->outstanding=GETPOST('OutstandingBill'); $result=$object->set_OutstandingBill($user); if ($result < 0) setEventMessage($object->error,'errors'); } From 4c168b3adb24875c2c1a179404640d6f7c64da92 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Fri, 27 Sep 2013 22:00:11 +0200 Subject: [PATCH 08/19] Update propal.php --- htdocs/comm/propal.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e2504eca6af..232fea74d3a 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1884,6 +1884,18 @@ else print ''; } + if ($soc->outstandingbill) + { + // Outstanding Bill + print ''; + print $langs->trans('OutstandingBill'); + print ''; + print price($soc->get_OutstandingBill()).' / '; + print price($soc->outstandingbill).''.$langs->trans("Currency".$conf->currency); + print ''; + print ''; + } + // Other attributes $res=$object->fetch_optionals($object->id,$extralabels); $parameters=array('colspan' => ' colspan="3"'); From fff1309cec9a320e128b4cb241470d100edfe5fb Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Fri, 27 Sep 2013 22:06:05 +0200 Subject: [PATCH 09/19] Update facture.php --- htdocs/compta/facture.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index ee62ac5d977..7e8230eccd8 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3007,6 +3007,7 @@ else if ($id > 0 || ! empty($ref)) $nbrows=8; $nbcols=2; if (! empty($conf->projet->enabled)) $nbrows++; if (! empty($conf->banque->enabled)) $nbcols++; + if (! empty($soc->outstandingbill)) $nbrows++; if($mysoc->localtax1_assuj=="1") $nbrows++; if($mysoc->localtax2_assuj=="1") $nbrows++; if ($selleruserevenustamp) $nbrows++; @@ -3278,6 +3279,18 @@ else if ($id > 0 || ! empty($ref)) } print ''; + if ($soc->outstandingbill) + { + // Outstanding Bill + print ''; + print $langs->trans('OutstandingBill'); + print ''; + print price($soc->get_OutstandingBill()).' / '; + print price($soc->outstandingbill); + print ''; + print ''; + } + // Amount print ''.$langs->trans('AmountHT').''; print ''.price($object->total_ht,1,'',1,-1,-1,$conf->currency).''; From ca0ba99effb6ae70e20e1b3b78145bc3eaad3d10 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Fri, 27 Sep 2013 22:08:06 +0200 Subject: [PATCH 10/19] Update facture.php --- htdocs/compta/facture.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7e8230eccd8..bd8970d6c26 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2292,6 +2292,18 @@ if ($action == 'create') print ''; } + if ($soc->outstandingbill) + { + // Outstanding Bill + print ''; + print $langs->trans('OutstandingBill'); + print ''; + print price($soc->get_OutstandingBill()).' / '; + print price($soc->outstandingbill).''; + print ''; + print ''; + } + // Other attributes $parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook From f52e9812fa91889b6562fa946b1f87ce00f9c40e Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Fri, 27 Sep 2013 22:12:12 +0200 Subject: [PATCH 11/19] Update societe.class.php --- htdocs/societe/class/societe.class.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 811c2c55e4d..937167a6bca 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2778,6 +2778,28 @@ class Societe extends CommonObject } } + /** + * return amount of bill not paid + * + * @return boolean Yes or no + */ + function get_OutstandingBill() + { + $sql = "SELECT sum(total) as amount FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= " WHERE fk_soc = ". $this->id; + $sql .= " AND paye = 0"; + $sql .= " AND fk_statut <> 0"; + + dol_syslog("get_OutstandingBill sql=".$sql); + $resql=$this->db->query($sql); + if ($resql) + { + $obj=$this->db->fetch_object($resql); + return ($obj->amount); + } + else + return 0; + } /** * Return label of status customer is prospect/customer From 6b909746f483ab2184eb336900d1c6be918a169c Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Oct 2013 17:14:14 +0200 Subject: [PATCH 12/19] Update llx_societe.sql --- htdocs/install/mysql/tables/llx_societe.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index a7004844352..6d149ea263c 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -85,7 +85,7 @@ create table llx_societe barcode varchar(255), -- barcode fk_barcode_type integer NULL DEFAULT 0, -- barcode type price_level integer NULL, -- level of price for multiprices - outstanding double(24,8) DEFAULT 0, + outstanding_limit double(24,8) DEFAULT 0, default_lang varchar(6), -- default language logo varchar(255), canvas varchar(32), -- type of canvas if used (null by default) From 5bae0dbc180899cb630bd146f951db82b3e12f7f Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Oct 2013 17:14:50 +0200 Subject: [PATCH 13/19] Update 3.4.0-3.5.0.sql --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 60f18dafcdd..dddb6c5cb1d 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -295,4 +295,4 @@ ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_mode_reglement integer NULL; ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_cond_reglement integer NULL; -- add outstanding bill -ALTER TABLE llx_societe ADD outstanding double(24,8) 0 AFTER mode_reglement_supplier; +ALTER TABLE llx_societe ADD outstanding_limit double(24,8) 0 AFTER mode_reglement_supplier; From 95a69b5d8e835feb7fb9b94584a25a4d7483f0cb Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Oct 2013 17:17:51 +0200 Subject: [PATCH 14/19] Update fiche.php --- htdocs/comm/fiche.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 7752b9c4606..a4e310d5ce7 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -132,7 +132,7 @@ if ($action == 'cstc') if ($action == 'setOutstandingBill') { $object->fetch($id); - $object->outstanding=GETPOST('OutstandingBill'); + $object->outstanding_limit=GETPOST('OutstandingBill'); $result=$object->set_OutstandingBill($user); if ($result < 0) setEventMessage($object->error,'errors'); } @@ -381,9 +381,9 @@ if ($id > 0) { print ''; print ''; - print $form->editfieldkey("OutstandingBill",'OutstandingBill',$object->outstanding,$object,$user->rights->societe->creer); + print $form->editfieldkey("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; - print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding,$object,$user->rights->societe->creer); + print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; print ''; } From 7828219787e8e2597f45dd68c3da7d39a2c8fd47 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Oct 2013 17:19:18 +0200 Subject: [PATCH 15/19] Update societe.class.php --- htdocs/societe/class/societe.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 937167a6bca..47556296c2f 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -126,7 +126,7 @@ class Societe extends CommonObject var $statut_commercial; var $price_level; - var $outstanding; + var $outstanding_limit; var $datec; var $date_update; @@ -711,7 +711,7 @@ class Societe extends CommonObject $sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode'; $sql .= ', s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj'; $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax2_assuj, s.fk_prospectlevel, s.default_lang, s.logo'; - $sql .= ', s.outstanding, s.import_key, s.canvas'; + $sql .= ', s.outstanding_limit, s.import_key, s.canvas'; $sql .= ', fj.libelle as forme_juridique'; $sql .= ', e.libelle as effectif'; $sql .= ', p.code as country_code, p.libelle as country'; @@ -841,7 +841,7 @@ class Societe extends CommonObject $this->default_lang = $obj->default_lang; $this->logo = $obj->logo; - $this->outstanding = $obj->outstanding; + $this->outstanding_limit = $obj->outstanding_limit; // multiprix $this->price_level = $obj->price_level; @@ -2757,11 +2757,11 @@ class Societe extends CommonObject $now=dol_now(); - $outstanding = price2num($this->outstanding); + $outstanding = price2num($this->outstanding_limit); // Positionne l'encours de facturaiton $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET "; - $sql.= " outstanding=".$outstanding; + $sql.= " outstanding_limit=".$outstanding; $sql.= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::set_outstanding sql=".$sql); From 2360dc52dd69c4049d70407691433c8fba0dd933 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Oct 2013 17:21:10 +0200 Subject: [PATCH 16/19] Update societe.class.php --- htdocs/societe/class/societe.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 47556296c2f..a3815b937ae 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2785,6 +2785,13 @@ class Societe extends CommonObject */ function get_OutstandingBill() { + /* Accurate value of remain to pay is to sum remaintopay for each invoice + $paiement = $invoice->getSommePaiement(); + $creditnotes=$invoice->getSumCreditNotesUsed(); + $deposits=$invoice->getSumDepositsUsed(); + $alreadypayed=price2num($paiement + $creditnotes + $deposits,'MT'); + $remaintopay=price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits,'MT'); + */ $sql = "SELECT sum(total) as amount FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= " WHERE fk_soc = ". $this->id; $sql .= " AND paye = 0"; From 53531ff847b5766949d5eb56687b7057a2b43997 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Oct 2013 17:23:31 +0200 Subject: [PATCH 17/19] Update facture.php --- htdocs/compta/facture.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index bd8970d6c26..a455d2b51f9 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2292,14 +2292,14 @@ if ($action == 'create') print ''; } - if ($soc->outstandingbill) + if ($soc->outstanding_limit) { // Outstanding Bill print ''; print $langs->trans('OutstandingBill'); print ''; print price($soc->get_OutstandingBill()).' / '; - print price($soc->outstandingbill).''; + print price($soc->outstanding_limit).''; print ''; print ''; } From a40729312fc4bb6a20e57764b6e80524ecb27580 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Oct 2013 17:27:53 +0200 Subject: [PATCH 18/19] Update propal.php --- htdocs/comm/propal.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 232fea74d3a..015b566d1c5 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1884,14 +1884,14 @@ else print ''; } - if ($soc->outstandingbill) + if ($soc->outstanding_limit) { // Outstanding Bill print ''; print $langs->trans('OutstandingBill'); - print ''; + print ''; print price($soc->get_OutstandingBill()).' / '; - print price($soc->outstandingbill).''.$langs->trans("Currency".$conf->currency); + print price($soc->outstanding_limit, 0, '', 1, -1, -1, $conf->currency); print ''; print ''; } From a9308ca32055a8152c2e9d370595dc0b37b10fd4 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Oct 2013 17:30:19 +0200 Subject: [PATCH 19/19] Update fiche.php --- htdocs/commande/fiche.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 6bc2d02f25e..ce57b057531 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2195,6 +2195,19 @@ else print ''; } + + if ($soc->outstanding_limit) + { + // Outstanding Bill + print ''; + print $langs->trans('OutstandingBill'); + print ''; + print price($soc->get_OutstandingBill()).' / '; + print price($soc->outstanding_limit, 0, '', 1, -1, -1, $conf->currency); + print ''; + print ''; + } + // Other attributes $res=$object->fetch_optionals($object->id,$extralabels); $parameters=array('colspan' => ' colspan="3"');