From 796f34628dda99fbb757f141e34966555a549593 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Dec 2019 17:40:22 +0100 Subject: [PATCH] Debug v11 --- htdocs/comm/remx.php | 56 ++++++++++++++++----------- htdocs/core/class/html.form.class.php | 4 +- htdocs/core/lib/functions.lib.php | 2 +- htdocs/theme/eldy/theme_vars.inc.php | 2 +- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index e5f84bbec77..59c28cfb4ea 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -252,7 +252,7 @@ if ($socid > 0) print ''; print ''; - dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), 0, 'company'); + dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), -1, 'company'); dol_banner_tab($object, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom'); @@ -273,7 +273,7 @@ if ($socid > 0) } - print ''; + print '
'; if ($isCustomer) { // Calcul avoirs client en cours $remise_all = $remise_user = 0; @@ -342,13 +342,15 @@ if ($socid > 0) print ''; + dol_fiche_end(); + + if ($user->rights->societe->creer) { print '
'; print load_fiche_titre($langs->trans("NewGlobalDiscount"), '', ''); - print '
'; if ($isCustomer && !$isSupplier) { print ''; @@ -358,6 +360,8 @@ if ($socid > 0) print ''; } + dol_fiche_head(); + print '
'; if ($isCustomer && $isSupplier) { print ''; @@ -376,9 +380,9 @@ if ($socid > 0) print ''; print "
'.$langs->trans('DiscountType').'
"; - } - dol_fiche_end(); + dol_fiche_end(); + } if ($user->rights->societe->creer) { @@ -404,7 +408,7 @@ if ($socid > 0) /* - * Liste remises fixes client restant en cours (= liees a aucune facture ni ligne de facture) + * List remises fixes client restant en cours (= liees a aucune facture ni ligne de facture) */ print load_fiche_titre($langs->trans("DiscountStillRemaining")); @@ -511,15 +515,14 @@ if ($socid > 0) { print ''.price($obj->multicurrency_amount_ttc).''; } - print ''; + print ''; print ''.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.''; print ''; if ($user->rights->societe->creer || $user->rights->facture->creer) { - print ''; - print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; - //print '   '; - print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; + print ''; + print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; + print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; print ''; } else print ' '; @@ -535,7 +538,9 @@ if ($socid > 0) } else { - print ''.$langs->trans("None").''; + $colspan = 8; + if (!empty($conf->multicurrency->enabled)) $colspan+=2; + print ''.$langs->trans("None").''; } $db->free($resql); print ""; @@ -551,7 +556,7 @@ if ($socid > 0) array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') ); $langs->load("dict"); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, '', 0); } } else @@ -672,9 +677,8 @@ if ($socid > 0) if ($user->rights->societe->creer || $user->rights->facture->creer) { print ''; - print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; - //print '   '; - print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; + print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; + print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; print ''; } else print ' '; @@ -690,7 +694,9 @@ if ($socid > 0) } else { - print ''.$langs->trans("None").''; + $colspan = 8; + if (!empty($conf->multicurrency->enabled)) $colspan+=2; + print ''.$langs->trans("None").''; } $db->free($resql); print ""; @@ -701,9 +707,9 @@ if ($socid > 0) $amount1 = price2num($showconfirminfo['amount_ttc'] / 2, 'MT'); $amount2 = ($showconfirminfo['amount_ttc'] - $amount1); $formquestion = array( - 'text' => $langs->trans('TypeAmountOfEachNewDiscount'), - array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'), - array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') + 'text' => $langs->trans('TypeAmountOfEachNewDiscount'), + array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'), + array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') ); $langs->load("dict"); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); @@ -738,7 +744,7 @@ if ($socid > 0) // Discount linked to invoice lines $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; - $sql .= " rc.fk_facture_source,"; + $sql .= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture_source,"; $sql .= " u.login, u.rowid as user_id,"; $sql .= " f.rowid as invoiceid, f.ref,"; $sql .= " fa.ref as invoice_source_ref, fa.type as type"; @@ -890,7 +896,9 @@ if ($socid > 0) } else { - print ''.$langs->trans("None").''; + $colspan = 8; + if (!empty($conf->multicurrency->enabled)) $colspan+=2; + print ''.$langs->trans("None").''; } print ""; @@ -1064,7 +1072,9 @@ if ($socid > 0) } else { - print ''.$langs->trans("None").''; + $colspan = 8; + if (!empty($conf->multicurrency->enabled)) $colspan+=2; + print ''.$langs->trans("None").''; } print ""; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 23d7e88b45b..57b29e78647 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4117,7 +4117,9 @@ class Form // Now add questions $more .= '
'."\n"; - if (!empty($formquestion['text'])) $more .= ''.$formquestion['text'].''."\n"; + if (!empty($formquestion['text'])) { + $more .= '
'.$formquestion['text'].'
'."\n"; + } foreach ($formquestion as $key => $input) { if (is_array($input) && !empty($input)) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 59037d18525..6306162af34 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3081,7 +3081,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'address'=> 'address-book', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'project'=>'sitemap', 'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'generic'=>'folder-open', 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'object_bookmark'=>'star', 'bookmark'=>'star', 'stats' => 'chart-bar', - 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-fork', + 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-branch', 'object_list'=>'list-alt', 'object_calendar'=>'calendar-alt', 'object_calendarweek'=>'calendar-week', 'object_calendarmonth'=>'calendar-alt', 'object_calendarday'=>'calendar-day', 'object_calendarperuser'=>'table', 'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt' diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index e59d8e3f81a..5f7c8f60233 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -108,7 +108,7 @@ $badgeStatus0 = '#cbd3d3'; $badgeStatus1 = '#bc9526'; $badgeStatus2 = '#e6f0f0'; $badgeStatus3 = '#bca52b'; -$badgeStatus4 = '#759580'; +$badgeStatus4 = '#55a590'; $badgeStatus5 = '#cad2d2'; $badgeStatus6 = '#cad2d2'; $badgeStatus7 = '#baa32b';