From c87c695d436af12ab66365437539251da320d4cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 May 2022 14:15:42 +0200 Subject: [PATCH] Debug v16 --- htdocs/compta/facture/card-rec.php | 24 +++++++++++++----------- htdocs/compta/facture/card.php | 4 ++-- htdocs/core/class/commonobject.class.php | 4 ++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index ca61eafcc3b..6300e387067 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1034,21 +1034,11 @@ if ($action == 'create') { // Payment mode print "".$langs->trans("PaymentMode").""; + print img_picto('', 'payment', 'class="pictofixedwidth"'); print $form->select_types_paiements(GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id', 'int') : $object->mode_reglement_id, 'mode_reglement_id', '', 0, 1, 0, 0, 1, '', 1); //$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', '', 1); print ""; - // Project - if (!empty($conf->projet->enabled) && is_object($object->thirdparty) && $object->thirdparty->id > 0) { - $projectid = GETPOST('projectid') ?GETPOST('projectid') : $object->fk_project; - $langs->load('projects'); - print ''.$langs->trans('Project').''; - print img_picto('', 'project'); - $numprojet = $formproject->select_projects($object->thirdparty->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, ''); - print '   thirdparty->id.(!empty($id) ? '&id='.$id : '')).'">'.img_object($langs->trans("AddProject"), 'add').''; - print ''; - } - // Bank account if ($object->fk_account > 0) { print "".$langs->trans('BankAccount').""; @@ -1056,10 +1046,22 @@ if ($action == 'create') { print ""; } + // Project + if (!empty($conf->projet->enabled) && is_object($object->thirdparty) && $object->thirdparty->id > 0) { + $projectid = GETPOST('projectid') ?GETPOST('projectid') : $object->fk_project; + $langs->load('projects'); + print ''.$langs->trans('Project').''; + print img_picto('', 'project', 'class="pictofixedwidth"'); + $numprojet = $formproject->select_projects($object->thirdparty->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, ''); + print '   thirdparty->id.(!empty($id) ? '&id='.$id : '')).'">'.img_object($langs->trans("AddProject"), 'add').''; + print ''; + } + // Model pdf print "".$langs->trans('Model').""; include_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; $list = ModelePDFFactures::liste_modeles($db); + print img_picto('', 'generic', 'class="pictofixedwidth"'); print $form->selectarray('modelpdf', $list, $conf->global->FACTURE_ADDON_PDF); print ""; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 8ad3dfd22bc..96a4bdab311 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3607,8 +3607,8 @@ if ($action == 'create') { // Payment mode print ''.$langs->trans('PaymentMode').''; - print img_picto('', 'bank', 'class="pictofixedwidth"'); - $form->select_types_paiements(GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id') : $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx'); + print img_picto('', 'payment', 'class="pictofixedwidth"'); + print $form->select_types_paiements(GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id') : $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1); print ''; // Bank Account diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 94486508788..cb1f0c76a86 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3391,9 +3391,9 @@ abstract class CommonObject * Must be called at end of methods addline or updateline. * * @param int $exclspec >0 = Exclude special product (product_type=9) - * @param string $roundingadjust 'none'=Do nothing, 'auto'=Use default method (MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND if defined, or '0'), '0'=Force mode total of rounding, '1'=Force mode rounding of total + * @param string $roundingadjust 'none'=Do nothing, 'auto'=Use default method (MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND if defined, or '0'), '0'=Force mode Total of rounding, '1'=Force mode Rounding of total * @param int $nodatabaseupdate 1=Do not update database. Update only properties of object. - * @param Societe $seller If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object. + * @param Societe $seller If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object (used to analyze lines to check corrupted data). * @return int <0 if KO, >0 if OK */ public function update_price($exclspec = 0, $roundingadjust = 'none', $nodatabaseupdate = 0, $seller = null)