diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php
index 0e82681c686..bece7e72d01 100644
--- a/htdocs/admin/prelevement.php
+++ b/htdocs/admin/prelevement.php
@@ -110,6 +110,51 @@ if ($action == "deletenotif")
exit;
}
+if ($action == 'specimen')
+{
+ $modele=GETPOST('module','alpha');
+
+ $commande = new Commande($db);
+ $commande->initAsSpecimen();
+
+ // Search template files
+ $file=''; $classname=''; $filefound=0;
+ $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
+ foreach($dirmodels as $reldir)
+ {
+ $file=dol_buildpath($reldir."core/modules/commande/doc/pdf_".$modele.".modules.php",0);
+ if (file_exists($file))
+ {
+ $filefound=1;
+ $classname = "pdf_".$modele;
+ break;
+ }
+ }
+
+ if ($filefound)
+ {
+ require_once $file;
+
+ $module = new $classname($db);
+
+ if ($module->write_file($commande,$langs) > 0)
+ {
+ header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande&file=SPECIMEN.pdf");
+ return;
+ }
+ else
+ {
+ setEventMessages($module->error, null, 'errors');
+ dol_syslog($module->error, LOG_ERR);
+ }
+ }
+ else
+ {
+ setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
+ dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
+ }
+}
+
/*
* View
diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php
index 982cb95d208..297d0085136 100644
--- a/htdocs/core/modules/modPrelevement.class.php
+++ b/htdocs/core/modules/modPrelevement.class.php
@@ -92,7 +92,7 @@ class modPrelevement extends DolibarrModules
$r=0;
$r++;
$this->rights[$r][0] = 151;
- $this->rights[$r][1] = 'Read withdrawals';
+ $this->rights[$r][1] = 'Read direct debit payment orders';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'bons';
@@ -100,7 +100,7 @@ class modPrelevement extends DolibarrModules
$r++;
$this->rights[$r][0] = 152;
- $this->rights[$r][1] = 'Create/modify a withdrawals';
+ $this->rights[$r][1] = 'Create/modify a direct debit payment order';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'bons';
@@ -108,7 +108,7 @@ class modPrelevement extends DolibarrModules
$r++;
$this->rights[$r][0] = 153;
- $this->rights[$r][1] = 'Send withdrawals to bank';
+ $this->rights[$r][1] = 'Send/Transmit direct debit payment orders';
$this->rights[$r][2] = 'a';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'bons';
@@ -116,7 +116,7 @@ class modPrelevement extends DolibarrModules
$r++;
$this->rights[$r][0] = 154;
- $this->rights[$r][1] = 'credit/refuse withdrawals';
+ $this->rights[$r][1] = 'Record Credits/Rejects of direct debit payment orders';
$this->rights[$r][2] = 'a';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'bons';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 54cda62d35b..aa1b98ccf58 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -437,8 +437,8 @@ Module55Name=Barcodes
Module55Desc=Barcode management
Module56Name=Telephony
Module56Desc=Telephony integration
-Module57Name=Standing orders
-Module57Desc=Standing orders and withdrawal management. Also includes generation of SEPA file for european countries.
+Module57Name=Direct bank payment orders
+Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for european countries.
Module58Name=ClickToDial
Module58Desc=Integration of a ClickToDial system (Asterisk, ...)
Module59Name=Bookmark4u
@@ -615,10 +615,10 @@ Permission142=Create/modify all projects and tasks (also private projects i am n
Permission144=Delete all projects and tasks (also private projects i am not contact for)
Permission146=Read providers
Permission147=Read stats
-Permission151=Read standing orders
-Permission152=Create/modify a standing orders request
-Permission153=Transmission standing orders receipts
-Permission154=Credit/refuse standing orders receipts
+Permission151=Read direct debit payment orders
+Permission152=Create/modify a direct debit payment orders
+Permission153=Send/Transmit direct debit payment orders
+Permission154=Record Credits/Rejects of direct debit payment orders
Permission161=Read contracts/subscriptions
Permission162=Create/modify contracts/subscriptions
Permission163=Activate a service/subscription of a contract
diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang
index 54b3de3915b..3ecc090f2fe 100644
--- a/htdocs/langs/en_US/withdrawals.lang
+++ b/htdocs/langs/en_US/withdrawals.lang
@@ -1,15 +1,16 @@
# Dolibarr language file - Source file is en_US - withdrawals
-CustomersStandingOrdersArea=Customers standing orders area
-StandingOrders=Standing orders
-StandingOrder=Standing orders
-NewStandingOrder=New standing order
+CustomersStandingOrdersArea=Direct debit payment orders area
+SuppliersStandingOrdersArea=Direct credit payment orders area
+StandingOrders=Direct debit payment orders
+StandingOrder=Direct debit payment order
+NewStandingOrder=New direct debit payment order
StandingOrderToProcess=To process
WithdrawalsReceipts=Withdrawal receipts
WithdrawalReceipt=Withdrawal receipt
LastWithdrawalReceipts=Latest %s withdrawal receipts
WithdrawalsLines=Withdrawal lines
-RequestStandingOrderToTreat=Request for standing orders to process
-RequestStandingOrderTreated=Request for standing orders processed
+RequestStandingOrderToTreat=Request for direct debit payment order to process
+RequestStandingOrderTreated=Request for direct debit payment order processed
NotPossibleForThisStatusOfWithdrawReceiptORLine=Not yet possible. Withdraw status must be set to 'credited' before declaring reject on specific lines.
NbOfInvoiceToWithdraw=Nb. of invoice with withdraw request
NbOfInvoiceToWithdrawWithInfo=Nb. of invoice with withdraw request for customers having defined bank account information
@@ -66,7 +67,7 @@ CreditDate=Credit on
WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported)
ShowWithdraw=Show Withdraw
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one withdrawal payment not yet processed, it won't be set as paid to allow prior withdrawal management.
-DoStandingOrdersBeforePayments=This tab allows you to request a standing order. Once done, go into menu Bank->Withdrawal to manage the standing order. When standing order is closed, payment on invoice will be automatically recorded, and invoice closed if remainder to pay is null.
+DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Withdrawal to manage the direct debit payment order. When payment order is closed, payment on invoice will be automatically recorded, and invoice closed if remainder to pay is null.
WithdrawalFile=Withdrawal file
SetToStatusSent=Set to status "File Sent"
ThisWillAlsoAddPaymentOnInvoice=This will also apply payments to invoices and will classify them as "Paid"
@@ -78,11 +79,11 @@ WithdrawRequestAmount=Withdraw request amount:
WithdrawRequestErrorNilAmount=Unable to create withdraw request for nil amount.
### 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 sent to bank by %s %s.
+InfoCreditSubject=Payment of direct debit payment order %s by the bank
+InfoCreditMessage=The direct debit payment order %s has been paid by the bank
Data of payment: %s
+InfoTransSubject=Transmission of direct debit payment order %s to bank
+InfoTransMessage=The direct debit payment order %s has been sent to bank by %s %s.
InfoTransData=Amount: %s
Method: %s
Date: %s
-InfoRejectSubject=Standing order refused
-InfoRejectMessage=Hello,
the standing order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.
--
%s
+InfoRejectSubject=Direct debit payment order refused
+InfoRejectMessage=Hello,
the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.
--
%s
ModeWarning=Option for real mode was not set, we stop after this simulation
diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php
index e4eb0ef7053..f1ba5217b8e 100644
--- a/htdocs/societe/rib.php
+++ b/htdocs/societe/rib.php
@@ -1,7 +1,7 @@
* Copyright (C) 2003 Jean-Louis Bergamo
- * Copyright (C) 2004-2015 Laurent Destailleur
+ * Copyright (C) 2004-2016 Laurent Destailleur
* Copyright (C) 2005-2009 Regis Houssin
* Copyright (C) 2013 Peter Fontaine
* Copyright (C) 2015-2016 Marcos GarcĂa