Fix some warnings -technical debt- (#26466)
* fix warnings 1 * fix previous commit 1 * Update facture-rec.class.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
b962cce609
commit
a1597e6eb1
9 changed files with 65 additions and 12 deletions
|
|
@ -286,6 +286,7 @@ class Commande extends CommonOrder
|
|||
public $online_payment_url;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
|
|
@ -2350,7 +2351,7 @@ class Commande extends CommonOrder
|
|||
*
|
||||
* TODO FONCTION NON FINIE A FINIR
|
||||
*/
|
||||
public function stock_array($filtre_statut = self::STATUS_CANCELED)
|
||||
/*public function stock_array($filtre_statut = self::STATUS_CANCELED)
|
||||
{
|
||||
// phpcs:enable
|
||||
$this->stocks = array();
|
||||
|
|
@ -2378,7 +2379,7 @@ class Commande extends CommonOrder
|
|||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Delete an order line
|
||||
|
|
|
|||
|
|
@ -278,7 +278,6 @@ class Account extends CommonObject
|
|||
public $ics_transfer;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
|
|
@ -1568,11 +1567,11 @@ class Account extends CommonObject
|
|||
// Call functions to check BAN
|
||||
if (!checkIbanForAccount($this)) {
|
||||
$error++;
|
||||
$this->error_message = 'IBANNotValid';
|
||||
$this->error = 'IBANNotValid';
|
||||
}
|
||||
if (!checkSwiftForAccount($this)) {
|
||||
$error++;
|
||||
$this->error_message = 'SwiftNotValid';
|
||||
$this->error = 'SwiftNotValid';
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
|
|
@ -2014,6 +2013,10 @@ class AccountLine extends CommonObjectLine
|
|||
|
||||
public $note;
|
||||
|
||||
/**
|
||||
* User author of the rapprochement.
|
||||
*/
|
||||
public $user_rappro;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -747,9 +747,9 @@ class PaymentVarious extends CommonObject
|
|||
|
||||
$this->id = $obj->rowid;
|
||||
$this->user_creation = $obj->fk_user_author;
|
||||
$this->user_modif = $obj->fk_user_modif;
|
||||
$this->user_modification_id = $obj->fk_user_modif;
|
||||
$this->date_creation = $this->db->jdate($obj->datec);
|
||||
$this->date_modif = $this->db->jdate($obj->tms);
|
||||
$this->date_modification = $this->db->jdate($obj->tms);
|
||||
}
|
||||
$this->db->free($result);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -86,6 +86,10 @@ class FactureRec extends CommonInvoice
|
|||
*/
|
||||
public $titre;
|
||||
|
||||
/**
|
||||
* @var double
|
||||
*/
|
||||
public $multicurrency_subprice;
|
||||
public $socid;
|
||||
public $number;
|
||||
public $date;
|
||||
|
|
@ -264,7 +268,7 @@ class FactureRec extends CommonInvoice
|
|||
$facsrc = new Facture($this->db);
|
||||
$result = $facsrc->fetch($facid);
|
||||
if ($result > 0) {
|
||||
$this->fk_soc = $facsrc->socid;
|
||||
$this->socid = $facsrc->socid;
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_rec (";
|
||||
$sql .= "titre";
|
||||
|
|
@ -296,7 +300,7 @@ class FactureRec extends CommonInvoice
|
|||
$sql .= ", suspended";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= "'".$this->db->escape($this->titre ? $this->titre : $this->title)."'";
|
||||
$sql .= ", ".((int) $this->fk_soc);
|
||||
$sql .= ", ".((int) $this->socid);
|
||||
$sql .= ", ".((int) $conf->entity);
|
||||
$sql .= ", '".$this->db->idate($now)."'";
|
||||
$sql .= ", ".(!empty($facsrc->total_ttc) ? ((float) $facsrc->total_ttc) : '0');
|
||||
|
|
@ -493,7 +497,7 @@ class FactureRec extends CommonInvoice
|
|||
$sql .= " localtax2 = ".((float) $this->total_localtax2).",";
|
||||
$sql .= " total_ht = ".((float) $this->total_ht).",";
|
||||
$sql .= " total_ttc = ".((float) $this->total_ttc).",";
|
||||
$sql .= " remise_percent = ".((float) $this->remise_percent);
|
||||
//$sql .= " remise_percent = ".((float) $this->remise_percent);
|
||||
// TODO Add missing fields
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
|
|
|
|||
|
|
@ -248,6 +248,18 @@ class Facture extends CommonInvoice
|
|||
*/
|
||||
public $retained_warranty_fk_cond_reglement;
|
||||
|
||||
/**
|
||||
* @var int availabilty ID
|
||||
*/
|
||||
public $availability_id;
|
||||
|
||||
public $date_closing;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $source;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -6006,6 +6018,11 @@ class FactureLigne extends CommonInvoiceLine
|
|||
public $marge_tx;
|
||||
public $marque_tx;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $tva_npr;
|
||||
|
||||
public $remise_percent;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ if ($object->id > 0) {
|
|||
print $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
|
||||
if (!empty($bac->iban)) {
|
||||
if ($bac->verif() <= 0) {
|
||||
print img_warning('Error on default bank number for IBAN : '.$bac->error_message);
|
||||
print img_warning('Error on default bank number for IBAN : '.$bac->error);
|
||||
}
|
||||
} else {
|
||||
if ($numopen || ($type != 'bank-transfer' && $object->mode_reglement_code == 'PRE') || ($type == 'bank-transfer' && $object->mode_reglement_code == 'VIR')) {
|
||||
|
|
|
|||
|
|
@ -49,6 +49,24 @@ class Localtax extends CommonObject
|
|||
public $datev;
|
||||
public $amount;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $accountid;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $fk_type;
|
||||
|
||||
public $paymenttype;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $rappro;
|
||||
|
||||
|
||||
/**
|
||||
* @var string local tax
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ if ($resql) {
|
|||
if (!empty($bac->iban) || !empty($bac->bic)) {
|
||||
print $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
|
||||
if ($bac->verif() <= 0) {
|
||||
print img_warning('Error on default bank number for IBAN : '.$langs->trans($bac->error_message));
|
||||
print img_warning('Error on default bank number for IBAN : '.$langs->trans($bac->error));
|
||||
}
|
||||
} else {
|
||||
print img_warning($langs->trans("IBANNotDefined"));
|
||||
|
|
|
|||
|
|
@ -66,6 +66,16 @@ abstract class CommonInvoice extends CommonObject
|
|||
public $mode_reglement_id;
|
||||
public $mode_reglement_code; // Code in llx_c_paiement
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $mode_reglement;
|
||||
|
||||
/**
|
||||
* @var double
|
||||
*/
|
||||
public $revenuestamp;
|
||||
|
||||
public $totalpaid; // duplicate with sumpayed
|
||||
public $totaldeposits; // duplicate with sumdeposit
|
||||
public $totalcreditnotes; // duplicate with sumcreditnote
|
||||
|
|
|
|||
Loading…
Reference in a new issue