Renamed method
This commit is contained in:
parent
392a99b905
commit
f79d004e3c
@ -248,7 +248,7 @@ class Facturation
|
|||||||
public function raz_pers()
|
public function raz_pers()
|
||||||
{
|
{
|
||||||
$this->num_facture('RESET');
|
$this->num_facture('RESET');
|
||||||
$this->getPaymentMode('RESET');
|
$this->getSetPaymentMode('RESET');
|
||||||
$this->montant_encaisse('RESET');
|
$this->montant_encaisse('RESET');
|
||||||
$this->montant_rendu('RESET');
|
$this->montant_rendu('RESET');
|
||||||
$this->paiement_le('RESET');
|
$this->paiement_le('RESET');
|
||||||
@ -491,7 +491,7 @@ class Facturation
|
|||||||
* @param int $aModeReglement Payment mode
|
* @param int $aModeReglement Payment mode
|
||||||
* @return int Payment mode
|
* @return int Payment mode
|
||||||
*/
|
*/
|
||||||
public function mode_reglement( $aModeReglement=null )
|
public function getSetPaymentMode( $aModeReglement=null )
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( !$aModeReglement ) {
|
if ( !$aModeReglement ) {
|
||||||
|
|||||||
@ -151,7 +151,7 @@ $tab_tva = $ret;
|
|||||||
|
|
||||||
|
|
||||||
// Reinitialisation du mode de paiement, en cas de retour aux achats apres validation
|
// 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_encaisse('RESET');
|
||||||
$obj_facturation->montant_rendu('RESET');
|
$obj_facturation->montant_rendu('RESET');
|
||||||
$obj_facturation->paiement_le('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("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>
|
<tr><td class="resume_label"><?php echo $langs->trans("PaymentMode"); ?> </td><td>
|
||||||
<?php
|
<?php
|
||||||
switch ($obj_facturation->getPaymentMode())
|
switch ($obj_facturation->getSetPaymentMode())
|
||||||
{
|
{
|
||||||
case 'ESP':
|
case 'ESP':
|
||||||
echo $langs->trans("Cash");
|
echo $langs->trans("Cash");
|
||||||
@ -75,7 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Affichage des infos en fonction du mode de paiement
|
// 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>');
|
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->num_facture($num);
|
||||||
|
|
||||||
$obj_facturation->getPaymentMode($_POST['hdnChoix']);
|
$obj_facturation->getSetPaymentMode($_POST['hdnChoix']);
|
||||||
|
|
||||||
// Si paiement autre qu'en especes, montant encaisse = prix total
|
// Si paiement autre qu'en especes, montant encaisse = prix total
|
||||||
$mode_reglement = $obj_facturation->getPaymentMode();
|
$mode_reglement = $obj_facturation->getSetPaymentMode();
|
||||||
if ( $mode_reglement != 'ESP' ) {
|
if ( $mode_reglement != 'ESP' ) {
|
||||||
$montant = $obj_facturation->prix_total_ttc();
|
$montant = $obj_facturation->prix_total_ttc();
|
||||||
} else {
|
} else {
|
||||||
@ -103,7 +103,7 @@ switch ($action)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( $obj_facturation->getPaymentMode() )
|
switch ( $obj_facturation->getSetPaymentMode() )
|
||||||
{
|
{
|
||||||
case 'DIF':
|
case 'DIF':
|
||||||
$mode_reglement_id = 0;
|
$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($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
|
if (empty($cond_reglement_id)) $cond_reglement_id=0; // If cond_reglement_id not found
|
||||||
$note .= $_POST['txtaNotes'];
|
$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;
|
$error=0;
|
||||||
@ -206,7 +206,7 @@ switch ($action)
|
|||||||
//print "c=".$invoice->cond_reglement_id." m=".$invoice->mode_reglement_id; exit;
|
//print "c=".$invoice->cond_reglement_id." m=".$invoice->mode_reglement_id; exit;
|
||||||
|
|
||||||
// Si paiement differe ...
|
// Si paiement differe ...
|
||||||
if ( $obj_facturation->getPaymentMode() == 'DIF' )
|
if ( $obj_facturation->getSetPaymentMode() == 'DIF' )
|
||||||
{
|
{
|
||||||
$resultcreate=$invoice->create($user,0,dol_stringtotime($obj_facturation->paiement_le()));
|
$resultcreate=$invoice->create($user,0,dol_stringtotime($obj_facturation->paiement_le()));
|
||||||
if ($resultcreate > 0)
|
if ($resultcreate > 0)
|
||||||
@ -254,7 +254,7 @@ switch ($action)
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
if ($invoice->total_ttc == $obj_facturation->prix_total_ttc()
|
if ($invoice->total_ttc == $obj_facturation->prix_total_ttc()
|
||||||
&& $obj_facturation->getPaymentMode() != 'DIFF')
|
&& $obj_facturation->getSetPaymentMode() != 'DIFF')
|
||||||
{
|
{
|
||||||
// We set status to payed
|
// We set status to payed
|
||||||
$result=$invoice->set_paid($user);
|
$result=$invoice->set_paid($user);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user