Fix label of remain to pay on vendor invoices
FIX tool to fix bank account not in main currency for vendor invoice
This commit is contained in:
parent
aa86b2c71f
commit
307476786c
@ -769,13 +769,13 @@ if ($action == 'create') {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if ($conf->prelevement->enabled) {
|
if ($conf->prelevement->enabled) {
|
||||||
print '<tr><td>'.$langs->trans("ICS").' ('.$langs->trans("StandingOrder").')</td>';
|
print '<tr><td>'.$form->textwithpicto($langs->trans("ICS"), $langs->trans("ICS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("StandingOrder")).')').'</td>';
|
||||||
print '<td>'.$object->ics.'</td>';
|
print '<td>'.$object->ics.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->paymentbybanktransfer->enabled) {
|
if ($conf->paymentbybanktransfer->enabled) {
|
||||||
print '<tr><td>'.$langs->trans("ICS").' ('.$langs->trans("BankTransfer").')</td>';
|
print '<tr><td>'.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'</td>';
|
||||||
print '<td>'.$object->ics_transfer.'</td>';
|
print '<td>'.$object->ics_transfer.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@ -1068,12 +1068,12 @@ if ($action == 'create') {
|
|||||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOSTISSET('bic') ? GETPOST('bic', 'alphanohtml') : $object->bic).'"></td></tr>';
|
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOSTISSET('bic') ? GETPOST('bic', 'alphanohtml') : $object->bic).'"></td></tr>';
|
||||||
|
|
||||||
if ($conf->prelevement->enabled) {
|
if ($conf->prelevement->enabled) {
|
||||||
print '<tr><td>'.$langs->trans("ICS").' ('.$langs->trans("StandingOrder").')</td>';
|
print '<tr><td>'.$form->textwithpicto($langs->trans("ICS"), $langs->trans("ICS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("StandingOrder")).')').'</td>';
|
||||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics" value="'.(GETPOSTISSET('ics') ? GETPOST('ics', 'alphanohtml') : $object->ics).'"></td></tr>';
|
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics" value="'.(GETPOSTISSET('ics') ? GETPOST('ics', 'alphanohtml') : $object->ics).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->paymentbybanktransfer->enabled) {
|
if ($conf->paymentbybanktransfer->enabled) {
|
||||||
print '<tr><td>'.$langs->trans("ICS").' ('.$langs->trans("BankTransfer").')</td>';
|
print '<tr><td>'.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'</td>';
|
||||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.(GETPOSTISSET('ics_transfer') ? GETPOST('ics_transfer', 'alphanohtml') : $object->ics_transfer).'"></td></tr>';
|
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.(GETPOSTISSET('ics_transfer') ? GETPOST('ics_transfer', 'alphanohtml') : $object->ics_transfer).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1846,7 +1846,7 @@ if ($action == 'create') {
|
|||||||
$currency_code = $conf->currency;
|
$currency_code = $conf->currency;
|
||||||
|
|
||||||
$societe = '';
|
$societe = '';
|
||||||
if (GETPOST('socid') > 0) {
|
if (GETPOST('socid', 'int') > 0) {
|
||||||
$societe = new Societe($db);
|
$societe = new Societe($db);
|
||||||
$societe->fetch(GETPOST('socid', 'int'));
|
$societe->fetch(GETPOST('socid', 'int'));
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) {
|
if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) {
|
||||||
@ -3285,10 +3285,9 @@ if ($action == 'create') {
|
|||||||
// Remainder to pay
|
// Remainder to pay
|
||||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||||
print '<span class="opacitymedium">';
|
print '<span class="opacitymedium">';
|
||||||
if ($resteapayeraffiche >= 0) {
|
print $langs->trans('RemainderToPay');
|
||||||
print $langs->trans('RemainderToPay');
|
if ($resteapayeraffiche < 0) {
|
||||||
} else {
|
print ' ('.$langs->trans('NegativeIfExcessPaid').')';
|
||||||
print $langs->trans('ExcessPaid');
|
|
||||||
}
|
}
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -3298,10 +3297,9 @@ if ($action == 'create') {
|
|||||||
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
||||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||||
print '<span class="opacitymedium">';
|
print '<span class="opacitymedium">';
|
||||||
if ($resteapayeraffiche <= 0) {
|
print $langs->trans('RemainderToPayMulticurrency');
|
||||||
print $langs->trans('RemainderToPayBackMulticurrency');
|
if ($resteapayeraffiche < 0) {
|
||||||
} else {
|
print ' ('.$langs->trans('NegativeIfExcessPaid').')';
|
||||||
print $langs->trans('ExcessPaidMulticurrency');
|
|
||||||
}
|
}
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -3322,10 +3320,9 @@ if ($action == 'create') {
|
|||||||
// Remainder to pay back
|
// Remainder to pay back
|
||||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||||
print '<span class="opacitymedium">';
|
print '<span class="opacitymedium">';
|
||||||
if ($resteapayeraffiche <= 0) {
|
print $langs->trans('RemainderToPayBack');
|
||||||
print $langs->trans('RemainderToPayBack');
|
if ($resteapayeraffiche > 0) {
|
||||||
} else {
|
print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
|
||||||
print $langs->trans('ExcessPaid');
|
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</span>';
|
print '</span>';
|
||||||
@ -3335,10 +3332,9 @@ if ($action == 'create') {
|
|||||||
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
||||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||||
print '<span class="opacitymedium">';
|
print '<span class="opacitymedium">';
|
||||||
if ($resteapayeraffiche <= 0) {
|
print $langs->trans('RemainderToPayBackMulticurrency');
|
||||||
print $langs->trans('RemainderToPayBackMulticurrency');
|
if ($resteapayeraffiche> 0) {
|
||||||
} else {
|
print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
|
||||||
print $langs->trans('ExcessPaidMulticurrency');
|
|
||||||
}
|
}
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -562,3 +562,6 @@ DELETE FROM llx_rights_def WHERE module = 'hrm' AND perms = 'employee';
|
|||||||
-- DROP TABLE tmp_bank;
|
-- DROP TABLE tmp_bank;
|
||||||
-- CREATE TABLE tmp_bank SELECT b.rowid, b.amount, p.rowid as pid, p.amount as pamount, p.multicurrency_amount as pmulticurrencyamount FROM llx_bank as b INNER JOIN llx_bank_url as bu ON bu.fk_bank=b.rowid AND bu.type = 'payment' INNER JOIN llx_paiement as p ON bu.url_id = p.rowid WHERE p.multicurrency_amount <> 0 AND p.multicurrency_amount <> p.amount;
|
-- CREATE TABLE tmp_bank SELECT b.rowid, b.amount, p.rowid as pid, p.amount as pamount, p.multicurrency_amount as pmulticurrencyamount FROM llx_bank as b INNER JOIN llx_bank_url as bu ON bu.fk_bank=b.rowid AND bu.type = 'payment' INNER JOIN llx_paiement as p ON bu.url_id = p.rowid WHERE p.multicurrency_amount <> 0 AND p.multicurrency_amount <> p.amount;
|
||||||
-- UPDATE llx_bank as b SET b.amount_main_currency = (SELECT tb.pamount FROM tmp_bank as tb WHERE tb.rowid = b.rowid) WHERE b.amount_main_currency IS NULL;
|
-- UPDATE llx_bank as b SET b.amount_main_currency = (SELECT tb.pamount FROM tmp_bank as tb WHERE tb.rowid = b.rowid) WHERE b.amount_main_currency IS NULL;
|
||||||
|
-- DROP TABLE tmp_bank2;
|
||||||
|
-- CREATE TABLE tmp_bank2 SELECT b.rowid, b.amount, p.rowid as pid, p.amount as pamount, p.multicurrency_amount as pmulticurrencyamount FROM llx_bank as b INNER JOIN llx_bank_url as bu ON bu.fk_bank=b.rowid AND bu.type = 'payment_supplier' INNER JOIN llx_paiementfourn as p ON bu.url_id = p.rowid WHERE p.multicurrency_amount <> 0 AND p.multicurrency_amount <> p.amount;
|
||||||
|
-- UPDATE llx_bank as b SET b.amount_main_currency = (SELECT tb.pamount FROM tmp_bank2 as tb WHERE tb.rowid = b.rowid) WHERE b.amount_main_currency IS NULL;
|
||||||
|
|||||||
@ -137,6 +137,7 @@ SEPAFRST=SEPA FRST
|
|||||||
ExecutionDate=Execution date
|
ExecutionDate=Execution date
|
||||||
CreateForSepa=Create direct debit file
|
CreateForSepa=Create direct debit file
|
||||||
ICS=Creditor Identifier - ICS
|
ICS=Creditor Identifier - ICS
|
||||||
|
IDS=Debitor Identifier
|
||||||
END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction
|
END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction
|
||||||
USTRD="Unstructured" SEPA XML tag
|
USTRD="Unstructured" SEPA XML tag
|
||||||
ADDDAYS=Add days to Execution Date
|
ADDDAYS=Add days to Execution Date
|
||||||
@ -154,4 +155,5 @@ ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default
|
|||||||
ErrorICSmissing=Missing ICS in Bank account %s
|
ErrorICSmissing=Missing ICS in Bank account %s
|
||||||
TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines
|
TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines
|
||||||
WarningSomeDirectDebitOrdersAlreadyExists=Warning: There is already some pending Direct Debit orders (%s) requested for an amount of %s
|
WarningSomeDirectDebitOrdersAlreadyExists=Warning: There is already some pending Direct Debit orders (%s) requested for an amount of %s
|
||||||
WarningSomeCreditTransferAlreadyExists=Warning: There is already some pending Credit Transfer (%s) requested for an amount of %s
|
WarningSomeCreditTransferAlreadyExists=Warning: There is already some pending Credit Transfer (%s) requested for an amount of %s
|
||||||
|
UsedFor=Used for %s
|
||||||
Loading…
Reference in New Issue
Block a user