mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-14 13:31:28 +01:00
Indentation du code et suppression des caracteres de control M
This commit is contained in:
@@ -64,48 +64,48 @@ class PaiementFourn
|
|||||||
|
|
||||||
if (isset($result))
|
if (isset($result))
|
||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id();
|
$this->id = $this->db->last_insert_id();
|
||||||
|
|
||||||
$label = "R<EFBFBD>glement facture $this->facnumber - $this->societe";
|
$label = "R<EFBFBD>glement facture $this->facnumber - $this->societe";
|
||||||
|
|
||||||
// Portion de code qui m<>riterait de se baser sur la table des types
|
// Portion de code qui m<>riterait de se baser sur la table des types
|
||||||
// de paiement, mais comme cette portion est aussi en dur dans l'ajout
|
// de paiement, mais comme cette portion est aussi en dur dans l'ajout
|
||||||
// des factures clients, je fais pareil pour les factures fournisseurs
|
// des factures clients, je fais pareil pour les factures fournisseurs
|
||||||
switch ($this->paiementid)
|
switch ($this->paiementid)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
$this->paiementid = 'TIP';
|
$this->paiementid = 'TIP';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$this->paiementid = 'VIR';
|
$this->paiementid = 'VIR';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->paiementid = 'PRE';
|
$this->paiementid = 'PRE';
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$this->paiementid = 'LIQ';
|
$this->paiementid = 'LIQ';
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
$this->paiementid = 'WWW';
|
$this->paiementid = 'WWW';
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
$this->paiementid = 'CB';
|
$this->paiementid = 'CB';
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
$this->paiementid = 'CHQ';
|
$this->paiementid = 'CHQ';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank (datec, dateo, amount, author, label, fk_type, fk_account, num_chq)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank (datec, dateo, amount, author, label, fk_type, fk_account, num_chq)";
|
||||||
$sql .= " VALUES (now(), '$this->datepaye', -$this->amount, '$this->author', '$label', '$this->paiementid', '$this->accountid', '$this->num_paiement')";
|
$sql .= " VALUES (now(), '$this->datepaye', -$this->amount, '$this->author', '$label', '$this->paiementid', '$this->accountid', '$this->num_paiement')";
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
// Mise a jour fk_bank dans llx_paiement_fourn
|
// Mise a jour fk_bank dans llx_paiement_fourn
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->bankid = $this->db->last_insert_id();
|
$this->bankid = $this->db->last_insert_id();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."paiementfourn SET fk_bank=$this->bankid WHERE rowid=$this->id";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."paiementfourn SET fk_bank=$this->bankid WHERE rowid=$this->id";
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user