Skip to content
Snippets Groups Projects
Commit f79d004e authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Renamed method

parent 392a99b9
No related branches found
No related tags found
No related merge requests found
......@@ -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 ) {
......
......@@ -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');
......
......@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<tr><td class="resume_label"><?php echo $langs->trans("TotalTTC"); ?> </td><td><?php echo price2num($obj_facturation->prix_total_ttc(),'MT').' '.$conf->currency; ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("PaymentMode"); ?> </td><td>
<?php
switch ($obj_facturation->getPaymentMode())
switch ($obj_facturation->getSetPaymentMode())
{
case 'ESP':
echo $langs->trans("Cash");
......@@ -75,7 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<?php
// Affichage des infos en fonction du mode de paiement
if ( $obj_facturation->getPaymentMode() == 'DIF' ) {
if ( $obj_facturation->getsetPaymentMode() == 'DIF' ) {
echo ('<tr><td class="resume_label">'.$langs->trans("DateEcheance").'</td><td>'.$obj_facturation->paiement_le().'</td></tr>');
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment