diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c69b794a011..c479b59cbde 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9307,11 +9307,12 @@ class Form * * @param string $save_label Alternative label for save button * @param string $cancel_label Alternative label for cancel button - * @param array $morefields Add additional buttons between save and cancel + * @param array $morebuttons Add additional buttons between save and cancel * @param bool $withoutdiv Option to remove enclosing centered div + * @param string $morecss More CSS * @return string Html code with the buttons */ - public function buttonsSaveCancel($save_label = 'Save', $cancel_label = 'Cancel', $morefields = array(), $withoutdiv = 0) + public function buttonsSaveCancel($save_label = 'Save', $cancel_label = 'Cancel', $morebuttons = array(), $withoutdiv = 0, $morecss = '') { global $langs; @@ -9335,8 +9336,8 @@ class Form !empty($save_label) ? $buttons[] = $save : ''; - if (!empty($morefields)) { - $buttons[] = $morefields; + if (!empty($morebuttons)) { + $buttons[] = $morebuttons; } !empty($cancel_label) ? $buttons[] = $cancel : ''; @@ -9345,7 +9346,7 @@ class Form foreach ($buttons as $button) { $addclass = empty($button['addclass']) ? '' : $button['addclass']; - $retstring .= ''; + $retstring .= ''; } $retstring .= $withoutdiv ? '': ''; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 983a355b867..911b9cb08c3 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1696,20 +1696,20 @@ if ($action == 'create') { } } }*/ - $morehtmlref .= ''; + $morehtmlref .= ''; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - print '
| '.$langs->trans("User").' | '; - print ''; + // Author + print ' |
| '.$langs->trans("User").' | '; + print ''; if ($object->fk_user_author > 0) { $userauthor = new User($db); $result = $userauthor->fetch($object->fk_user_author); @@ -1719,15 +1719,15 @@ if ($action == 'create') { print $userauthor->getNomUrl(-1); } } - print ' |
| '.$langs->trans("Period").' | '; - print ''; - print get_date_range($object->date_debut, $object->date_fin, 'day', $langs, 0); - print ' | '; - print '
| '.$langs->trans("Period").' | '; + print ''; + print get_date_range($object->date_debut, $object->date_fin, 'day', $langs, 0); + print ' | '; + print '
| '.$langs->trans("ModePaiement").' | '; @@ -1735,20 +1735,20 @@ if ($action == 'create') { print '|
| '.$langs->trans("DATE_SAVE").' | '; - print ''.dol_print_date($object->date_valid, 'dayhour', 'tzuser'); + // Validation date + print ' |
| '.$langs->trans("DATE_SAVE").' | '; + print ''.dol_print_date($object->date_valid, 'dayhour', 'tzuser'); if ($object->status == 2 && $object->hasDelay('toapprove')) { print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToApprove")); } if ($object->status == 5 && $object->hasDelay('topay')) { print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToPay")); } - print ' |
| '.$langs->trans("VALIDATOR").' | '; // approver @@ -1842,24 +1842,24 @@ if ($action == 'create') { */ } - // Other attributes - $cols = 2; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + $cols = 2; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - print '
| '.$langs->trans("AmountHT").' | '; - print ''.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).' | '; - $rowspan = 5; + // Amount + print '||||
| '.$langs->trans("AmountHT").' | '; + print ''.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).' | '; + $rowspan = 5; if ($object->status <= ExpenseReport::STATUS_VALIDATED) { $rowspan++; } elseif ($object->status == ExpenseReport::STATUS_CANCELED) { @@ -1873,15 +1873,15 @@ if ($action == 'create') { if ($object->status == ExpenseReport::STATUS_CLOSED) { $rowspan += 2; } - print ""; - print '||||
| '.$langs->trans("AmountVAT").' | '; - print ''.price($object->total_tva, 1, '', 1, -1, -1, $conf->currency).' | '; - print '||||
| '.$langs->trans("AmountVAT").' | '; + print ''.price($object->total_tva, 1, '', 1, -1, -1, $conf->currency).' | '; + print '||||
| '.$langs->transcountry("AmountLT1", $mysoc->country_code).' | '; print ''.price($object->total_localtax1, 1, '', 1, -1, -1, $conf->currency).' | '.price($object->total_localtax2, 1, '', 1, -1, -1, $conf->currency).' | '; } - print '|||
| '.$langs->trans("AmountTTC").' | '; - print ''.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).' | '; - print '||||
| '.$langs->trans("AmountTTC").' | '; + print ''.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).' | '; + print '
| '.$langs->trans('Payments').' | '; - print ''.$langs->trans('Date').' | '; - print ''.$langs->trans('Type').' | '; + print '|||
| '.$langs->trans('Payments').' | '; + print ''.$langs->trans('Date').' | '; + print ''.$langs->trans('Type').' | '; if (!empty($conf->banque->enabled)) { print ''.$langs->trans('BankAccount').' | '; } - print ''.$langs->trans('Amount').' | '; - print ''; - print ' | '.$langs->trans('Amount').' | '; + print ''; + print ''; - // Payments already done (from payment on this expensereport) - $sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount, p.fk_bank,"; - $sql .= "c.code as p_code, c.libelle as payment_type,"; - $sql .= "ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal"; - $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."payment_expensereport as p"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepayment = c.id"; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; - $sql .= " WHERE e.rowid = '".$id."'"; - $sql .= " AND p.fk_expensereport = e.rowid"; - $sql .= ' AND e.entity IN ('.getEntity('expensereport').')'; - $sql .= " ORDER BY dp"; + // Payments already done (from payment on this expensereport) + $sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount, p.fk_bank,"; + $sql .= "c.code as p_code, c.libelle as payment_type,"; + $sql .= "ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal"; + $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."payment_expensereport as p"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepayment = c.id"; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; + $sql .= " WHERE e.rowid = '".$id."'"; + $sql .= " AND p.fk_expensereport = e.rowid"; + $sql .= ' AND e.entity IN ('.getEntity('expensereport').')'; + $sql .= " ORDER BY dp"; - $resql = $db->query($sql); + $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; $totalpaid = 0; @@ -2000,29 +2000,29 @@ if ($action == 'create') { } else { dol_print_error($db); } - print " |