diff --git a/htdocs/compta/prelevement/class/bon-prelevement.class.php b/htdocs/compta/prelevement/class/bon-prelevement.class.php index 001f41b64c5..90d198fc551 100644 --- a/htdocs/compta/prelevement/class/bon-prelevement.class.php +++ b/htdocs/compta/prelevement/class/bon-prelevement.class.php @@ -391,7 +391,7 @@ class BonPrelevement extends CommonObject */ function set_infocredit($user, $date) { - global $conf; + global $conf,$langs; $error == 0; @@ -411,11 +411,14 @@ class BonPrelevement extends CommonObject if ($this->db->query($sql)) { - $subject = "Credit prelevement ".$this->ref." a la banque"; - $message = "Le bon de prelevement ".$this->ref; + //$subject = "Credit prelevement ".$this->ref." a la banque"; + /*$message = "Le bon de prelevement ".$this->ref; $message.= " a ete credite par la banque.\n"; - $message.= "Date credit : ".dol_print_date($date,'dayhour'); - + $message.= "Date credit : ".dol_print_date($date,'dayhour');*/ + $langs->load('withdrawals'); + $subject = $langs->trans("InfoCreditSubject", $this->ref); + $message = $langs->trans("InfoCreditMessage", $this->ref, dol_print_date($date,'dayhour')); + $this->Notify($user, "cr", $subject, $message); // Update prelevement line @@ -480,7 +483,7 @@ class BonPrelevement extends CommonObject */ function set_infotrans($user, $date, $method) { - global $conf; + global $conf,$langs; $error == 0; dol_syslog("bon-prelevement::set_infotrans Start",LOG_INFO); @@ -498,14 +501,18 @@ class BonPrelevement extends CommonObject if ($this->db->query($sql)) { $this->method_trans = $method; - - $subject = "Transmission du prelevement ".$this->ref." a la banque"; + + /*$subject = "Transmission du prelevement ".$this->ref." a la banque"; $message = "Le bon de prelevement ".$this->ref; $message .= " a ete transmis a la banque par ".$user->prenom. " ".$user->nom; $message .= "\n\n"; $message .= "\nMontant : ".price($this->amount); $message .= "\nMethode : ".$this->methodes_trans[$this->method_trans]; - $message .= "\nDate : ".dol_print_date($date,'day'); + $message .= "\nDate : ".dol_print_date($date,'day');*/ + $langs->load('withdrawals'); + $subject = $langs->trans("InfoTransSubject", $this->ref); + $message = $langs->trans("InfoTransMessage", $this->ref, $user->prenom, $user->nom); + $message .=$langs->trans("InfoTransData", price($this->amount), $this->methodes_trans[$this->method_trans], dol_print_date($date,'day')); $this->Notify($user,"tr", $subject, $message, 1); } @@ -553,10 +560,10 @@ class BonPrelevement extends CommonObject */ function Notify($user, $action, $subject, $message, $joinfile=0) { - global $conf; + global $conf,$langs; $message .= "\n\n--\n"; - $message .= "Ceci est un message automatique envoye par Dolibarr"; + $message .= $langs->trans("InfoFoot"); //"Ceci est un message automatique envoye par Dolibarr"; $sql = "SELECT u.name, u.firstname, u.email"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; @@ -871,7 +878,7 @@ class BonPrelevement extends CommonObject } else { - print "Option for real mode was not set, we stop after this simulation\n"; + print $langs->trans("ModeWarning"); //"Option for real mode was not set, we stop after this simulation\n"; } } diff --git a/htdocs/langs/ca_ES/withdrawals.lang b/htdocs/langs/ca_ES/withdrawals.lang index ab8bc5b51a6..00bddf2f1b7 100644 --- a/htdocs/langs/ca_ES/withdrawals.lang +++ b/htdocs/langs/ca_ES/withdrawals.lang @@ -77,4 +77,13 @@ WithBankUsingBANBIC=Per als comptes bancaris que utilitzen el codi BAN/BIC/SWIFT BankToReceiveWithdraw=Informació del seu compte bancari receptor de les domiciliacions CreditDate=Abonada el WithdrawalFileNotCapable=No es possible generar fitxer bancari de domiciliacio per al seu pais -ShowWithdraw=Veure domiciliació \ No newline at end of file +ShowWithdraw=Veure domiciliació + +### Notifications +InfoCreditSubject=Abonament de domiciliació %s pel banc +InfoCreditMessage=L'ordre de domiciliació %s ha estat abonada pel banc
Data d'abonament: %s +InfoTransSubject=Enviament de domiciliació %s al banc +InfoTransMessage=L'ordre de domiciliació %s ha estat enviada al banc per %s %s.

+InfoTransData=Import: %s
Mètode: %s
Data: %s +InfoFoot=Aquest és un missatge automàtic enviat per Dolibarr +ModeWarning=No s'ha establert l'opció de treball en real, ens aturarem després d'aquesta simulació \ No newline at end of file diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index e477a12e7b9..2a54741a421 100755 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -77,4 +77,13 @@ WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT BankToReceiveWithdraw=Information about you bank account to receive withdraws CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country -ShowWithdraw=Show Withdraw \ No newline at end of file +ShowWithdraw=Show Withdraw + +### Notifications +InfoCreditSubject=Payment of standing order %s by the bank +InfoCreditMessage=The standing order %s has been paid by the bank
Data of payment: %s +InfoTransSubject=Transmission of standing order %s to bank +InfoTransMessage=The standing order %s has been transmited to bank by %s %s.

+InfoTransData=Amount: %s
Metode: %s
Date: %s +InfoFoot=This is an automated message sent by Dolibarr +ModeWarning=Option for real mode was not set, we stop after this simulation \ No newline at end of file diff --git a/htdocs/langs/es_AR/withdrawals.lang b/htdocs/langs/es_AR/withdrawals.lang index e8ebb17f33a..7aefd20ea54 100755 --- a/htdocs/langs/es_AR/withdrawals.lang +++ b/htdocs/langs/es_AR/withdrawals.lang @@ -77,4 +77,13 @@ WithBankUsingBANBIC=Para las cuentas bancarias que utilizan el código BAN/BIC/S BankToReceiveWithdraw=Información de su cuenta bancaria receptora de las domiciliaciones CreditDate=Abonada el WithdrawalFileNotCapable=No es posible generar fichero bancario de domiciliacion para su pais -ShowWithdraw=Ver domiciliación \ No newline at end of file +ShowWithdraw=Ver domiciliación + +### Notifications +InfoCreditSubject=Abono de domiciliación %s por el banco +InfoCreditMessage=La orden de domiciliación %s ha sido abonada por el banco
Fecha de abono: %s +InfoTransSubject=Envío de domiciliación %s al banco +InfoTransMessage=La orden de domiciliación %s ha sido enviada al banco por %s %s.

+InfoTransData=Importe: %s
Método: %s
Fecha: %s +InfoFoot=Este es un mensaje automático enviado por Dolibarr +ModeWarning=No se ha establecido la opción de modo real, nos detendremos después de esta simulación \ No newline at end of file diff --git a/htdocs/langs/es_ES/withdrawals.lang b/htdocs/langs/es_ES/withdrawals.lang index 2b6252a0073..e14a35b7529 100644 --- a/htdocs/langs/es_ES/withdrawals.lang +++ b/htdocs/langs/es_ES/withdrawals.lang @@ -77,4 +77,13 @@ WithBankUsingBANBIC=Para las cuentas bancarias que utilizan el código BAN/BIC/S BankToReceiveWithdraw=Información de su cuenta bancaria receptora de las domiciliaciones CreditDate=Abonada el WithdrawalFileNotCapable=No es posible generar fichero bancario de domiciliacion para su pais -ShowWithdraw=Ver domiciliación \ No newline at end of file +ShowWithdraw=Ver domiciliación + +### Notifications +InfoCreditSubject=Abono de domiciliación %s por el banco +InfoCreditMessage=La orden de domiciliación %s ha sido abonada por el banco
Fecha de abono: %s +InfoTransSubject=Envío de domiciliación %s al banco +InfoTransMessage=La orden de domiciliación %s ha sido enviada al banco por %s %s.

+InfoTransData=Importe: %s
Método: %s
Fecha: %s +InfoFoot=Este es un mensaje automático enviado por Dolibarr +ModeWarning=No se ha establecido la opción de modo real, nos detendremos después de esta simulación \ No newline at end of file diff --git a/htdocs/langs/fr_FR/withdrawals.lang b/htdocs/langs/fr_FR/withdrawals.lang index 1bf303a8447..29636bdeec0 100755 --- a/htdocs/langs/fr_FR/withdrawals.lang +++ b/htdocs/langs/fr_FR/withdrawals.lang @@ -77,4 +77,13 @@ WithBankUsingBANBIC=Pour les comptes bancaires utilisant le code BAN/BIC/SWIFT BankToReceiveWithdraw=Informations de votre compte bancaire recevant les prélèvements CreditDate=Crédité le WithdrawalFileNotCapable=Impossible de generer fichier de bon de prelevements pour votre pays -ShowWithdraw=Voir prélèvement \ No newline at end of file +ShowWithdraw=Voir prélèvement + +### Notifications +InfoCreditSubject=Credit prélèvement %s a la banque +InfoCreditMessage=Le bon de prélèvement %s a eté credité par la banque.
Date credit : %s +InfoTransSubject=Transmission du prélèvement %s a la banque +InfoTransMessage=Le bon de prélèvement %s a eté transmis a la banque par %s %s.

+InfoTransData=Montant: %s
Methode: %s
Date: %s +InfoFoot=Ceci est un message automatique envoye par Dolibarr +ModeWarning=Option mode réel non établi, nous allons arrêter après cette simulation \ No newline at end of file