diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 6de7d5f1c39..ab7b56c1bd4 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -302,20 +302,22 @@ if ($id > 0 || $ref) { print '
'; } - // Actions if ($action != 'settransmitted' && $action != 'setcredited') { print "\n".'
'."\n"; - if (empty($object->date_trans) && $user->rights->prelevement->bons->send) { - print ''.$langs->trans("SetToStatusSent").''; + if (empty($object->date_trans)) { + if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("SetToStatusSent"),'', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->send); + else print dolGetButtonAction($langs->trans("SetToStatusSent"),'', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->send); } if (!empty($object->date_trans) && $object->date_credit == 0) { - print ''.$langs->trans("ClassCredited").''; + if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("ClassDebited"),'', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->debit); + else print dolGetButtonAction($langs->trans("ClassCredited"),'', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->credit); } - print ''.$langs->trans("Delete").''; + if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("Delete"),'', 'delete', 'card.php?action=delete&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->create); + else print dolGetButtonAction($langs->trans("Delete"),'', 'delete', 'card.php?action=delete&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->creer); print '
'; } diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index aca238fcece..5efc4bf8e35 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -48,6 +48,7 @@ ThirdPartyBankCode=Third-party bank code NoInvoiceCouldBeWithdrawed=No invoice debited successfully. Check that invoices are on companies with a valid IBAN and that IBAN has a UMR (Unique Mandate Reference) with mode %s. WithdrawalCantBeCreditedTwice=This withdrawal receipt is already marked as credited; this can't be done twice, as this would potentially create duplicate payments and bank entries. ClassCredited=Classify credited +ClassDebited=Classify debited ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account? TransData=Transmission date TransMetod=Transmission method