Skip to content

Commit

Permalink
Merge pull request #11580 from aspangaro/9.0_FEC
Browse files Browse the repository at this point in the history
FIX FEC Format - Save translation of the journal label in database & nowrap on amount
  • Loading branch information
eldy committed Jul 30, 2019
2 parents 941b2c5 + bb168d7 commit a5e0dd5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions htdocs/accountancy/bookkeeping/card.php
Expand Up @@ -641,8 +641,8 @@
print '<td>' . $accountingaccount->getNomUrl(0,1,1,'',0) . '</td>';
print '<td>' . length_accounta($line->subledger_account) . '</td>';
print '<td>' . $line->label_operation. '</td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td class="nowrap right">' . price($line->debit) . '</td>';
print '<td class="nowrap right">' . price($line->credit) . '</td>';

print '<td align="center">';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
Expand Down Expand Up @@ -675,7 +675,7 @@
print $formaccounting->select_account($accountingaccount_number, 'accountingaccount_number', 1, array (), 1, 1, '');
print '</td>';
print '<td>';
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
Expand Down
8 changes: 4 additions & 4 deletions htdocs/accountancy/bookkeeping/list.php
Expand Up @@ -683,7 +683,7 @@
// Amount debit
if (! empty($arrayfields['t.debit']['checked']))
{
print '<td align="right">' . ($line->debit ? price($line->debit) : ''). '</td>';
print '<td class="nowrap right">' . ($line->debit ? price($line->debit) : ''). '</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totaldebitfield']=$totalarray['nbfield'];
$totalarray['totaldebit'] += $line->debit;
Expand All @@ -692,7 +692,7 @@
// Amount credit
if (! empty($arrayfields['t.credit']['checked']))
{
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
print '<td class="nowrap right">' . ($line->credit ? price($line->credit) : '') . '</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalcreditfield']=$totalarray['nbfield'];
$totalarray['totalcredit'] += $line->credit;
Expand Down Expand Up @@ -754,8 +754,8 @@
if ($num < $limit && empty($offset)) print '<td align="left">'.$langs->trans("Total").'</td>';
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
}
elseif ($totalarray['totaldebitfield'] == $i) print '<td align="right">'.price($totalarray['totaldebit']).'</td>';
elseif ($totalarray['totalcreditfield'] == $i) print '<td align="right">'.price($totalarray['totalcredit']).'</td>';
elseif ($totalarray['totaldebitfield'] == $i) print '<td class="nowrap right">'.price($totalarray['totaldebit']).'</td>';
elseif ($totalarray['totalcreditfield'] == $i) print '<td class="nowrap right">'.price($totalarray['totalcredit']).'</td>';
else print '<td></td>';
}
print '</tr>';
Expand Down
7 changes: 4 additions & 3 deletions htdocs/accountancy/class/bookkeeping.class.php
Expand Up @@ -472,14 +472,15 @@ function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_la
*/
public function createStd(User $user, $notrigger = false, $mode='')
{
global $conf;
global $conf, $langs;

$langs->loadLangs(array("accountancy", "bills", "compta"));

dol_syslog(__METHOD__, LOG_DEBUG);

$error = 0;

// Clean parameters

if (isset($this->doc_type)) {
$this->doc_type = trim($this->doc_type);
}
Expand Down Expand Up @@ -546,7 +547,7 @@ public function createStd(User $user, $notrigger = false, $mode='')
$now = dol_now();

// Check parameters
// Put here code to add control on parameters values
$this->journal_label = $langs->trans($this->journal_label);

// Insert request
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . $mode.' (';
Expand Down

0 comments on commit a5e0dd5

Please sign in to comment.