Debug v16
This commit is contained in:
parent
4e46c3f7a2
commit
f09638972c
@ -124,6 +124,12 @@ class Facture extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
public $fk_user_valid;
|
public $fk_user_valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $fk_user_modif;
|
||||||
|
|
||||||
|
|
||||||
public $date; // Date invoice
|
public $date; // Date invoice
|
||||||
public $datem;
|
public $datem;
|
||||||
|
|
||||||
@ -1935,7 +1941,7 @@ class Facture extends CommonInvoice
|
|||||||
$sql .= ', f.datec as datec';
|
$sql .= ', f.datec as datec';
|
||||||
$sql .= ', f.date_valid as datev';
|
$sql .= ', f.date_valid as datev';
|
||||||
$sql .= ', f.tms as datem';
|
$sql .= ', f.tms as datem';
|
||||||
$sql .= ', f.note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.last_main_doc';
|
$sql .= ', f.note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.fk_user_modif, f.model_pdf, f.last_main_doc';
|
||||||
$sql .= ', f.fk_facture_source, f.fk_fac_rec_source';
|
$sql .= ', f.fk_facture_source, f.fk_fac_rec_source';
|
||||||
$sql .= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet as fk_project, f.extraparams';
|
$sql .= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet as fk_project, f.extraparams';
|
||||||
$sql .= ', f.situation_cycle_ref, f.situation_counter, f.situation_final';
|
$sql .= ', f.situation_cycle_ref, f.situation_counter, f.situation_final';
|
||||||
@ -2023,8 +2029,10 @@ class Facture extends CommonInvoice
|
|||||||
$this->note_public = $obj->note_public;
|
$this->note_public = $obj->note_public;
|
||||||
$this->user_author = $obj->fk_user_author; // deprecated
|
$this->user_author = $obj->fk_user_author; // deprecated
|
||||||
$this->user_valid = $obj->fk_user_valid; // deprecated
|
$this->user_valid = $obj->fk_user_valid; // deprecated
|
||||||
|
$this->user_modification = $obj->fk_user_modif; // deprecated
|
||||||
$this->fk_user_author = $obj->fk_user_author;
|
$this->fk_user_author = $obj->fk_user_author;
|
||||||
$this->fk_user_valid = $obj->fk_user_valid;
|
$this->fk_user_valid = $obj->fk_user_valid;
|
||||||
|
$this->fk_user_modif = $obj->fk_user_modif;
|
||||||
$this->model_pdf = $obj->model_pdf;
|
$this->model_pdf = $obj->model_pdf;
|
||||||
$this->modelpdf = $obj->model_pdf; // deprecated
|
$this->modelpdf = $obj->model_pdf; // deprecated
|
||||||
$this->last_main_doc = $obj->last_main_doc;
|
$this->last_main_doc = $obj->last_main_doc;
|
||||||
|
|||||||
@ -51,12 +51,12 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$fieldid = (!empty($ref) ? 'ref' : 'rowid');
|
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
|
||||||
$result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', $fieldid, $isdraft);
|
|
||||||
|
$result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2015-2020 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2015-2020 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
@ -237,7 +237,7 @@ if (isModEnabled('facture') && !empty($user->rights->facture->lire)) {
|
|||||||
}
|
}
|
||||||
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).'</span></td>';
|
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).'</span></td>';
|
||||||
|
|
||||||
print '<td class="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
print '<td class="right" title="'.dol_escape_htmltag($langs->trans("DateModificationShort").' : '.dol_print_date($db->jdate($obj->tms), 'dayhour', 'tzuserrel')).'">'.dol_print_date($db->jdate($obj->tms), 'day', 'tzuserrel').'</td>';
|
||||||
|
|
||||||
print '<td>'.$tmpinvoice->getLibStatut(3, $obj->am).'</td>';
|
print '<td>'.$tmpinvoice->getLibStatut(3, $obj->am).'</td>';
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU
|
|||||||
print '<td class="right"><span class="amount">'.price($obj->total_ht).'</span></td>';
|
print '<td class="right"><span class="amount">'.price($obj->total_ht).'</span></td>';
|
||||||
}
|
}
|
||||||
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).'</span></td>';
|
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).'</span></td>';
|
||||||
print '<td class="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
print '<td class="right" title="'.dol_escape_htmltag($langs->trans("DateModificationShort").' : '.dol_print_date($db->jdate($obj->tms), 'dayhour', 'tzuserrel')).'">'.dol_print_date($db->jdate($obj->tms), 'day', 'tzuserrel').'</td>';
|
||||||
$alreadypaid = $facstatic->getSommePaiement();
|
$alreadypaid = $facstatic->getSommePaiement();
|
||||||
print '<td>'.$facstatic->getLibStatut(3, $alreadypaid).'</td>';
|
print '<td>'.$facstatic->getLibStatut(3, $alreadypaid).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -437,7 +437,7 @@ if (!empty($conf->don->enabled) && !empty($user->rights->don->lire)) {
|
|||||||
$total_ttc = $totalam = $total_ht = 0;
|
$total_ttc = $totalam = $total_ht = 0;
|
||||||
|
|
||||||
while ($i < $num && $i < $max) {
|
while ($i < $num && $i < $max) {
|
||||||
$objp = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
if ($i >= $max) {
|
if ($i >= $max) {
|
||||||
$othernb += 1;
|
$othernb += 1;
|
||||||
@ -447,24 +447,24 @@ if (!empty($conf->don->enabled) && !empty($user->rights->don->lire)) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$donationstatic->id = $objp->rowid;
|
$donationstatic->id = $obj->rowid;
|
||||||
$donationstatic->ref = $objp->rowid;
|
$donationstatic->ref = $obj->rowid;
|
||||||
$donationstatic->lastname = $objp->lastname;
|
$donationstatic->lastname = $obj->lastname;
|
||||||
$donationstatic->firstname = $objp->firstname;
|
$donationstatic->firstname = $obj->firstname;
|
||||||
$donationstatic->date = $objp->date;
|
$donationstatic->date = $obj->date;
|
||||||
$donationstatic->statut = $objp->status;
|
$donationstatic->statut = $obj->status;
|
||||||
$donationstatic->status = $objp->status;
|
$donationstatic->status = $obj->status;
|
||||||
|
|
||||||
$label = $donationstatic->getFullName($langs);
|
$label = $donationstatic->getFullName($langs);
|
||||||
if ($objp->societe) {
|
if ($obj->societe) {
|
||||||
$label .= ($label ? ' - ' : '').$objp->societe;
|
$label .= ($label ? ' - ' : '').$obj->societe;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven tdoverflowmax100">';
|
print '<tr class="oddeven tdoverflowmax100">';
|
||||||
print '<td>'.$donationstatic->getNomUrl(1).'</td>';
|
print '<td>'.$donationstatic->getNomUrl(1).'</td>';
|
||||||
print '<td>'.$label.'</td>';
|
print '<td>'.$label.'</td>';
|
||||||
print '<td class="nowrap right"><span class="amount">'.price($objp->amount).'</span></td>';
|
print '<td class="nowrap right"><span class="amount">'.price($obj->amount).'</span></td>';
|
||||||
print '<td class="right">'.dol_print_date($db->jdate($objp->dm), 'day').'</td>';
|
print '<td class="right" title="'.dol_escape_htmltag($langs->trans("DateModificationShort").' : '.dol_print_date($db->jdate($obj->dm), 'dayhour', 'tzuserrel')).'">'.dol_print_date($db->jdate($obj->dm), 'day', 'tzuserrel').'</td>';
|
||||||
print '<td>'.$donationstatic->getLibStatut(3).'</td>';
|
print '<td>'.$donationstatic->getLibStatut(3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -169,7 +169,7 @@ abstract class CommonObject
|
|||||||
public $canvas;
|
public $canvas;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Project The related project
|
* @var Project The related project object
|
||||||
* @see fetch_projet()
|
* @see fetch_projet()
|
||||||
*/
|
*/
|
||||||
public $project;
|
public $project;
|
||||||
@ -188,12 +188,12 @@ abstract class CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see fk_project
|
* @see $fk_project
|
||||||
*/
|
*/
|
||||||
public $fk_projet;
|
public $fk_projet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Contact a related contact
|
* @var Contact A related contact object
|
||||||
* @see fetch_contact()
|
* @see fetch_contact()
|
||||||
*/
|
*/
|
||||||
public $contact;
|
public $contact;
|
||||||
@ -205,7 +205,7 @@ abstract class CommonObject
|
|||||||
public $contact_id;
|
public $contact_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Societe A related thirdparty
|
* @var Societe A related thirdparty object
|
||||||
* @see fetch_thirdparty()
|
* @see fetch_thirdparty()
|
||||||
*/
|
*/
|
||||||
public $thirdparty;
|
public $thirdparty;
|
||||||
@ -254,7 +254,7 @@ abstract class CommonObject
|
|||||||
public $newref;
|
public $newref;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int The object's status
|
* @var int The object's status. Prefer use of status.
|
||||||
* @see setStatut()
|
* @see setStatut()
|
||||||
*/
|
*/
|
||||||
public $statut;
|
public $statut;
|
||||||
@ -265,6 +265,7 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
public $status;
|
public $status;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see getFullAddress()
|
* @see getFullAddress()
|
||||||
@ -319,6 +320,7 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
public $region;
|
public $region;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
* @see fetch_barcode()
|
* @see fetch_barcode()
|
||||||
@ -518,6 +520,24 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
public $date_modification; // Date last change (tms field)
|
public $date_modification; // Date last change (tms field)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string User id of author
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
public $user_author;
|
||||||
|
/**
|
||||||
|
* @var string User id of validation
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
public $user_valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string User id of last modifier
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
public $user_modification;
|
||||||
|
|
||||||
|
|
||||||
public $next_prev_filter;
|
public $next_prev_filter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -535,6 +555,7 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
public $alreadypaid;
|
public $alreadypaid;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array List of child tables. To test if we can delete object.
|
* @var array List of child tables. To test if we can delete object.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user