From 05c9e97fe40f805a17eb3468e3668aea9b8a1db1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 29 Aug 2019 00:45:02 +0200 Subject: [PATCH] The deprecated method get_OutstandingBill has been removed. You can use getOutstandingBills() instead. --- ChangeLog | 3 ++ htdocs/comm/propal/card.php | 3 +- htdocs/commande/card.php | 3 +- htdocs/compta/facture/card.php | 65 +++++++++++++------------- htdocs/don/card.php | 3 +- htdocs/societe/class/societe.class.php | 63 +++---------------------- htdocs/supplier_proposal/card.php | 3 +- 7 files changed, 50 insertions(+), 93 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ca4df10d38..54b40dc0f04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,9 @@ Following changes may create regressions for some external modules, but were nec * Removed the method liste_array() of project class. It was not used by core code. * The function show_theme() hase been renamed into showSkins() * Rename 'module_part' parameter into 'modulepart' into document APIs, for consistency. +* The deprecated method get_OutstandingBill has been removed. You can use getOutstandingBills() instead. + + ***** ChangeLog for 10.0.1 compared to 10.0.0 ***** diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 2ae67888658..9adc0bff336 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2248,7 +2248,8 @@ $formquestion = array_merge($formquestion, array( print ''; print $langs->trans('OutstandingBill'); print ''; - print price($soc->get_OutstandingBill()) . ' / '; + $arrayoutstandingbills = $soc->getOutstandingBills(); + print price($arrayoutstandingbills['opened']) . ' / '; print price($soc->outstanding_limit, 0, $langs, 1, - 1, - 1, $conf->currency); print ''; print ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 031d2c95235..bc728067b5f 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2138,7 +2138,8 @@ if ($action == 'create' && $usercancreate) print ''; print $langs->trans('OutstandingBill'); print ''; - print price($soc->get_OutstandingBill()) . ' / '; + $arrayoutstandingbills = $soc->getOutstandingBills(); + print price($arrayoutstandingbills['opened']) . ' / '; print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency); print ''; print ''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 54c339284a5..ff5a280a118 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -315,7 +315,7 @@ if (empty($reshook)) $object->retained_warranty_fk_cond_reglement = 0; // To clean property $result = $object->setRetainedWarrantyPaymentTerms(GETPOST('retained_warranty_fk_cond_reglement', 'int')); if ($result < 0) dol_print_error($db, $object->error); - + $old_rw_date_lim_reglement = $object->retained_warranty_date_limit; $new_rw_date_lim_reglement = $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement); if ($new_rw_date_lim_reglement > $old_rw_date_lim_reglement) $object->retained_warranty_date_limit = $new_rw_date_lim_reglement; @@ -323,7 +323,7 @@ if (empty($reshook)) $result = $object->update($user); if ($result < 0) dol_print_error($db, $object->error); } - + elseif ($action == 'setretainedwarranty' && $user->rights->facture->creer) { $object->fetch($id); @@ -331,7 +331,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - + elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) { $object->fetch($id); @@ -339,7 +339,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - + // Multicurrency Code elseif ($action == 'setmulticurrencycode' && $usercancreate) { @@ -1237,11 +1237,11 @@ if (empty($reshook)) $object->situation_counter = 1; $object->situation_final = 0; $object->situation_cycle_ref = $object->newCycle(); - - + + $object->retained_warranty = GETPOST('retained_warranty', 'int'); $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); - + $retained_warranty_date_limit = GETPOST('retained_warranty_date_limit'); if(!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)){ $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit); @@ -2761,7 +2761,8 @@ if ($action == 'create') print $soc->getNomUrl(1); print ''; // Outstanding Bill - $outstandingBills = $soc->get_OutstandingBill(); + $arrayoutstandingbills = $soc->getOutstandingBills(); + $outstandingBills = $arrayoutstandingbills['opened']; print ' (' . $langs->trans('CurrentOutstandingBill') . ': '; print price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency); if ($soc->outstanding_limit != '') @@ -3188,25 +3189,25 @@ if ($action == 'create') if (! empty($conf->global->INVOICE_USE_SITUATION)) { if($conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY){ - + $rwStyle = 'display:none;'; if(GETPOST('type', 'int') == Facture::TYPE_SITUATION){ $rwStyle = ''; } - - + + $retained_warranty = GETPOST('retained_warranty', 'int'); $retained_warranty = !empty($retained_warranty)?$retained_warranty:$conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT; print '' . $langs->trans('RetainedWarranty') . ''; print '%'; - + // Retained warranty payment term print '' . $langs->trans('PaymentConditionsShortRetainedWarranty') . ''; $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement)? $retained_warranty_fk_cond_reglement : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID; $form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1); print ''; - + print '