diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index cbca2b2f103..88e5eaf128c 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -76,7 +76,8 @@ WithdrawalFile=Withdrawal file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments to invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines -RUM=UMR +RUM=Unique Mandate Reference (UMR) +DateRUM=Mandate signature date RUMLong=Unique Mandate Reference RUMWillBeGenerated=If empty, a UMR (Unique Mandate Reference) will be generated once the bank account information is saved. WithdrawMode=Direct debit mode (FRST or RECUR) diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 0c4da8aa103..6f957be32d7 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -46,7 +46,7 @@ class CompanyBankAccount extends Account * @var integer */ public $datec; - + /** * Date modification record (tms) * @@ -217,7 +217,7 @@ class CompanyBankAccount extends Account if (empty($id) && empty($socid)) return -1; $sql = "SELECT rowid, type, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,"; - $sql.= " owner_address, default_rib, label, datec, tms as datem, rum, frstrecur"; + $sql.= " owner_address, default_rib, label, datec, tms as datem, rum, frstrecur, date_rum"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_rib"; if ($id) $sql.= " WHERE rowid = ".$id; if ($socid) @@ -255,6 +255,7 @@ class CompanyBankAccount extends Account $this->datem = $this->db->jdate($obj->datem); $this->rum = $obj->rum; $this->frstrecur = $obj->frstrecur; + $this->date_rum = $this->db->jdate($obj->date_rum); } $this->db->free($resql); diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 497afe9c210..8ec3cdc5ca6 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -157,9 +157,13 @@ if (empty($reshook)) $companybankaccount->owner_address = GETPOST('owner_address', 'alpha'); $companybankaccount->frstrecur = GETPOST('frstrecur', 'alpha'); $companybankaccount->rum = GETPOST('rum', 'alpha'); + $companybankaccount->date_rum = dol_mktime(0,0,0, GETPOST('date_rummonth'),GETPOST('date_rumday'),GETPOST('date_rumyear')); if (empty($companybankaccount->rum)) { $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); + } + if (empty($companybankaccount->date_rum)) + { $companybankaccount->date_rum = dol_now(); } @@ -268,6 +272,7 @@ if (empty($reshook)) $companybankaccount->owner_address = GETPOST('owner_address', 'alpha'); $companybankaccount->frstrecur = GETPOST('frstrecur'); $companybankaccount->rum = GETPOST('rum', 'alpha'); + $companybankaccount->date_rum = dol_mktime(0,0,0, GETPOST('date_rummonth'),GETPOST('date_rumday'),GETPOST('date_rumyear')); $companybankaccount->datec = dol_now(); $companybankaccount->status = 1; @@ -1208,6 +1213,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if (! empty($conf->prelevement->enabled)) { print_liste_field_titre("RUM"); + print_liste_field_titre("DateRUM"); print_liste_field_titre("WithdrawMode"); } print_liste_field_titre("DefaultRIB", '', '', '', '', '', '', '', 'center '); @@ -1257,8 +1263,6 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if (! empty($rib->iban)) { if (! checkIbanForAccount($rib)) { print ' '.img_picto($langs->trans("IbanNotValid"), 'warning'); - } else { - print ' '.img_picto($langs->trans("IbanValid"), 'info'); } } print ''; @@ -1267,8 +1271,6 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if (! empty($rib->bic)) { if (! checkSwiftForAccount($rib)) { print ' '.img_picto($langs->trans("SwiftNotValid"), 'warning'); - } else { - print ' '.img_picto($langs->trans("SwiftValid"), 'info'); } } print ''; @@ -1279,6 +1281,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' //print '