diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php
index 77054395e25..f5c28edfab4 100644
--- a/htdocs/cashdesk/class/Facturation.class.php
+++ b/htdocs/cashdesk/class/Facturation.class.php
@@ -248,7 +248,7 @@ class Facturation
public function raz_pers()
{
$this->num_facture('RESET');
- $this->getPaymentMode('RESET');
+ $this->getSetPaymentMode('RESET');
$this->montant_encaisse('RESET');
$this->montant_rendu('RESET');
$this->paiement_le('RESET');
@@ -491,7 +491,7 @@ class Facturation
* @param int $aModeReglement Payment mode
* @return int Payment mode
*/
- public function mode_reglement( $aModeReglement=null )
+ public function getSetPaymentMode( $aModeReglement=null )
{
if ( !$aModeReglement ) {
diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php
index b0519caabb3..9ec4af4df21 100644
--- a/htdocs/cashdesk/facturation.php
+++ b/htdocs/cashdesk/facturation.php
@@ -151,7 +151,7 @@ $tab_tva = $ret;
// Reinitialisation du mode de paiement, en cas de retour aux achats apres validation
-$obj_facturation->getPaymentMode('RESET');
+$obj_facturation->getSetPaymentMode('RESET');
$obj_facturation->montant_encaisse('RESET');
$obj_facturation->montant_rendu('RESET');
$obj_facturation->paiement_le('RESET');
diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php
index e69ecb27920..6ed13b6c0c8 100644
--- a/htdocs/cashdesk/tpl/validation1.tpl.php
+++ b/htdocs/cashdesk/tpl/validation1.tpl.php
@@ -40,7 +40,7 @@ along with this program. If not, see .
| trans("TotalTTC"); ?> | prix_total_ttc(),'MT').' '.$conf->currency; ?> |
| trans("PaymentMode"); ?> |
getPaymentMode())
+ switch ($obj_facturation->getSetPaymentMode())
{
case 'ESP':
echo $langs->trans("Cash");
@@ -75,7 +75,7 @@ along with this program. If not, see .
getPaymentMode() == 'DIF' ) {
+ if ( $obj_facturation->getsetPaymentMode() == 'DIF' ) {
echo (' |
| '.$langs->trans("DateEcheance").' | '.$obj_facturation->paiement_le().' |
');
diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php
index cb8ea1add3a..d4761778984 100644
--- a/htdocs/cashdesk/validation_verif.php
+++ b/htdocs/cashdesk/validation_verif.php
@@ -51,10 +51,10 @@ switch ($action)
$obj_facturation->num_facture($num);
- $obj_facturation->getPaymentMode($_POST['hdnChoix']);
+ $obj_facturation->getSetPaymentMode($_POST['hdnChoix']);
// Si paiement autre qu'en especes, montant encaisse = prix total
- $mode_reglement = $obj_facturation->getPaymentMode();
+ $mode_reglement = $obj_facturation->getSetPaymentMode();
if ( $mode_reglement != 'ESP' ) {
$montant = $obj_facturation->prix_total_ttc();
} else {
@@ -103,7 +103,7 @@ switch ($action)
exit;
}
- switch ( $obj_facturation->getPaymentMode() )
+ switch ( $obj_facturation->getSetPaymentMode() )
{
case 'DIF':
$mode_reglement_id = 0;
@@ -131,7 +131,7 @@ switch ($action)
if (empty($mode_reglement_id)) $mode_reglement_id=0; // If mode_reglement_id not found
if (empty($cond_reglement_id)) $cond_reglement_id=0; // If cond_reglement_id not found
$note .= $_POST['txtaNotes'];
- dol_syslog("obj_facturation->getPaymentMode()=".$obj_facturation->getPaymentMode()." mode_reglement_id=".$mode_reglement_id." cond_reglement_id=".$cond_reglement_id);
+ dol_syslog("obj_facturation->getSetPaymentMode()=".$obj_facturation->getSetPaymentMode()." mode_reglement_id=".$mode_reglement_id." cond_reglement_id=".$cond_reglement_id);
$error=0;
@@ -206,7 +206,7 @@ switch ($action)
//print "c=".$invoice->cond_reglement_id." m=".$invoice->mode_reglement_id; exit;
// Si paiement differe ...
- if ( $obj_facturation->getPaymentMode() == 'DIF' )
+ if ( $obj_facturation->getSetPaymentMode() == 'DIF' )
{
$resultcreate=$invoice->create($user,0,dol_stringtotime($obj_facturation->paiement_le()));
if ($resultcreate > 0)
@@ -254,7 +254,7 @@ switch ($action)
if (! $error)
{
if ($invoice->total_ttc == $obj_facturation->prix_total_ttc()
- && $obj_facturation->getPaymentMode() != 'DIFF')
+ && $obj_facturation->getSetPaymentMode() != 'DIFF')
{
// We set status to payed
$result=$invoice->set_paid($user);