Fix page of accountancy transaction
This commit is contained in:
parent
85dc6006c4
commit
e7b7c3281e
@ -618,9 +618,10 @@ if ($action == 'create') {
|
||||
print '<input type="hidden" name="fk_docdet" value="'.$object->fk_docdet.'">'."\n";
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">'."\n";
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
if (count($object->linesmvt) > 0) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
$total_debit = 0;
|
||||
$total_credit = 0;
|
||||
|
||||
@ -670,8 +671,14 @@ if ($action == 'create') {
|
||||
print '<input type="submit" class="button" name="update" value="'.$langs->trans("Update").'">';
|
||||
print '</td>';
|
||||
} else {
|
||||
$accountingaccount->fetch(null, $line->numero_compte, true);
|
||||
print '<td>'.$accountingaccount->getNomUrl(0, 1, 1, '', 0).'</td>';
|
||||
$resultfetch = $accountingaccount->fetch(null, $line->numero_compte, true);
|
||||
print '<td>';
|
||||
if ($resultfetch > 0) {
|
||||
$accountingaccount->getNomUrl(0, 1, 1, '', 0);
|
||||
} else {
|
||||
print $line->numero_compte.' <span class="warning">('.$langs->trans("AccountRemovedFromCurrentChartOfAccount").')</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.length_accounta($line->subledger_account);
|
||||
if ($line->subledger_label) {
|
||||
print ' - <span class="opacitymedium">'.$line->subledger_label.'</span>';
|
||||
@ -681,11 +688,15 @@ if ($action == 'create') {
|
||||
print '<td class="right nowraponall amount">'.price($line->debit).'</td>';
|
||||
print '<td class="right nowraponall amount">'.price($line->credit).'</td>';
|
||||
|
||||
print '<td class="center">';
|
||||
print '<td class="center nowraponall">';
|
||||
if (empty($line->date_export) && empty($line->date_validation)) {
|
||||
print '<a class="editfielda reposition" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $line->id . '&piece_num=' . urlencode($line->piece_num) . '&mode=' . urlencode($mode) . '&token=' . urlencode(newToken()) . '">';
|
||||
print img_edit('', 0, 'class="marginrightonly"');
|
||||
print '</a> ';
|
||||
} else {
|
||||
print '<a class="editfielda nohover cursornotallowed reposition disabled" href="#" title="'.dol_escape_htmltag($langs->trans("ForbiddenTransactionAlreadyExported")).'">';
|
||||
print img_edit($langs->trans("ForbiddenTransactionAlreadyExported"), 0, 'class="marginrightonly"');
|
||||
print '</a> ';
|
||||
}
|
||||
|
||||
if (empty($line->date_validation)) {
|
||||
@ -696,9 +707,13 @@ if ($action == 'create') {
|
||||
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=' . $actiontodelete . '&id=' . $line->id . '&piece_num=' . urlencode($line->piece_num) . '&mode=' . urlencode($mode) . '&token=' . urlencode(newToken()) . '">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a class="editfielda nohover cursornotallowed disabled" href="#" title="'.dol_escape_htmltag($langs->trans("ForbiddenTransactionAlreadyExported")).'">';
|
||||
print img_delete($langs->trans("ForbiddenTransactionAlreadyValidated"));
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
@ -733,12 +748,16 @@ if ($action == 'create') {
|
||||
print '<td><input type="text" class="minwidth200" name="label_operation" value="' . $label_operation . '"/></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="debit" value=""/></td>';
|
||||
print '<td class="right"><input type="text" size="6" class="right" name="credit" value=""/></td>';
|
||||
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
|
||||
print '<td>';
|
||||
print '<input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
if ($mode == '_tmp' && $action == '') {
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
@ -753,8 +772,9 @@ if ($action == 'create') {
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
} else {
|
||||
print load_fiche_titre($langs->trans("NoRecords"));
|
||||
|
||||
@ -387,7 +387,8 @@ SaleExport=Export sale
|
||||
SaleEEC=Sale in EEC
|
||||
SaleEECWithVAT=Sale in EEC with a VAT not null, so we suppose this is NOT an intracommunautary sale and the suggested account is the standard product account.
|
||||
SaleEECWithoutVATNumber=Sale in EEC with no VAT but the VAT ID of thirdparty is not defined. We fallback on the product account for standard sales. You can fix the VAT ID of thirdparty or the product account if needed.
|
||||
|
||||
ForbiddenTransactionAlreadyExported=Forbidden: The transaction has been validated and/or exported.
|
||||
ForbiddenTransactionAlreadyValidated=Forbidden: The transaction has been validated.
|
||||
## Dictionary
|
||||
Range=Range of accounting account
|
||||
Calculated=Calculated
|
||||
|
||||
@ -884,6 +884,10 @@ body[class*="colorblind-"] .text-success{
|
||||
.editfieldlang:hover {
|
||||
color: var(--colortexttitle) !important;
|
||||
}
|
||||
a.editfielda.nohover *:hover:before {
|
||||
color: #ccc !important;
|
||||
}
|
||||
|
||||
.fawidth30 {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
@ -1050,6 +1050,9 @@ body[class*="colorblind-"] .text-success{
|
||||
.editfielda span.fa-pencil-alt:hover, .editfielda span.fa-trash:hover {
|
||||
color: var(--colortexttitle) !important;
|
||||
}
|
||||
a.editfielda.nohover *:hover:before {
|
||||
color: #ccc !important;
|
||||
}
|
||||
|
||||
.size15x { font-size: 1.5em !important; }
|
||||
.fa-toggle-on, .fa-toggle-off, .size2x { font-size: 2em; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user