Fix translation and link to direct debit payment

This commit is contained in:
Laurent Destailleur 2017-02-10 10:43:54 +01:00
parent ad308e33cc
commit 66542b6367
3 changed files with 24 additions and 18 deletions

View File

@ -3939,7 +3939,7 @@ else if ($id > 0 || ! empty($ref))
} }
// Send by mail // Send by mail
if (($object->statut == 1 || $object->statut == 2) || ! empty($conf->global->FACTURE_SENDBYEMAIL_FOR_ALL_STATUS)) { if (($object->statut == Facture::STATUS_VALIDATED || $object->statut == Facture::STATUS_CLOSED) || ! empty($conf->global->FACTURE_SENDBYEMAIL_FOR_ALL_STATUS)) {
if ($objectidnext) { if ($objectidnext) {
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendByMail') . '</span></div>'; print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendByMail') . '</span></div>';
} else { } else {
@ -3950,21 +3950,27 @@ else if ($id > 0 || ! empty($ref))
} }
} }
// deprecated. Useless because now we can use templates // Request a direct debit order
if (! empty($conf->global->FACTURE_SHOW_SEND_REMINDER)) // For backward compatibility if ($object->statut > Facture::STATUS_DRAFT && $object->paye == 0 && $num == 0)
{ {
if (($object->statut == 1 || $object->statut == 2) && $resteapayer > 0) { if ($resteapayer > 0)
if ($objectidnext) { {
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendRemindByMail') . '</span></div>'; if ($user->rights->prelevement->bons->creer)
} else { {
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) { $langs->load("withdrawals");
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&amp;action=prerelance&amp;mode=init">' . $langs->trans('SendRemindByMail') . '</a></div>'; print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("MakeWithdrawRequest")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
} else }
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#">' . $langs->trans('SendRemindByMail') . '</a></div>'; else
} {
} //print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}
}
else
{
//print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AmountMustBePositive")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}
} }
// Create payment // Create payment
if ($object->type != Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) { if ($object->type != Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) {
if ($objectidnext) { if ($objectidnext) {

View File

@ -102,8 +102,8 @@ SearchACustomerInvoice=Search for a customer invoice
SearchASupplierInvoice=Search for a supplier invoice SearchASupplierInvoice=Search for a supplier invoice
CancelBill=Cancel an invoice CancelBill=Cancel an invoice
SendRemindByMail=Send reminder by EMail SendRemindByMail=Send reminder by EMail
DoPayment=Do payment DoPayment=Enter payment
DoPaymentBack=Do payment back DoPaymentBack=Enter refund
ConvertToReduc=Convert into future discount ConvertToReduc=Convert into future discount
EnterPaymentReceivedFromCustomer=Enter payment received from customer EnterPaymentReceivedFromCustomer=Enter payment received from customer
EnterPaymentDueToCustomer=Make payment due to customer EnterPaymentDueToCustomer=Make payment due to customer

View File

@ -76,8 +76,8 @@ RUM=UMR
RUMLong=Unique Mandate Reference RUMLong=Unique Mandate Reference
RUMWillBeGenerated=UMR number will be generated once bank account information are saved RUMWillBeGenerated=UMR number will be generated once bank account information are saved
WithdrawMode=Direct debit mode (FRST or RECUR) WithdrawMode=Direct debit mode (FRST or RECUR)
WithdrawRequestAmount=Withdraw request amount: WithdrawRequestAmount=Amount of Direct debit request:
WithdrawRequestErrorNilAmount=Unable to create withdraw request for nil amount. WithdrawRequestErrorNilAmount=Unable to create direct debit request for empty amount.
SepaMandate=SEPA Direct Debit Mandate SepaMandate=SEPA Direct Debit Mandate
SepaMandateShort=SEPA Mandate SepaMandateShort=SEPA Mandate
PleaseReturnMandate=Please return this mandate form by email to %s or by mail to PleaseReturnMandate=Please return this mandate form by email to %s or by mail to