mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts: htdocs/core/actions_massactions.inc.php htdocs/core/lib/functions.lib.php htdocs/expensereport/class/expensereport.class.php
This commit is contained in:
@@ -1376,48 +1376,49 @@ class Adherent extends CommonObject
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||
|
||||
$sql = "SELECT c.rowid, c.fk_adherent, c.subscription, c.note, c.fk_bank,";
|
||||
$sql.= " c.tms as datem,";
|
||||
$sql.= " c.datec as datec,";
|
||||
$sql.= " c.dateadh as dateh,";
|
||||
$sql.= " c.datef as datef";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."subscription as c";
|
||||
$sql.= " WHERE c.fk_adherent = ".$this->id;
|
||||
$sql.= " ORDER BY c.dateadh";
|
||||
$sql = "SELECT c.rowid, c.fk_adherent, c.fk_type, c.subscription, c.note, c.fk_bank,";
|
||||
$sql .= " c.tms as datem,";
|
||||
$sql .= " c.datec as datec,";
|
||||
$sql .= " c.dateadh as dateh,";
|
||||
$sql .= " c.datef as datef";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."subscription as c";
|
||||
$sql .= " WHERE c.fk_adherent = ".$this->id;
|
||||
$sql .= " ORDER BY c.dateadh";
|
||||
dol_syslog(get_class($this)."::fetch_subscriptions", LOG_DEBUG);
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$this->subscriptions=array();
|
||||
$this->subscriptions = array();
|
||||
|
||||
$i=0;
|
||||
$i = 0;
|
||||
while ($obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
if ($i==0)
|
||||
if ($i == 0)
|
||||
{
|
||||
$this->first_subscription_date=$this->db->jdate($obj->datec);
|
||||
$this->first_subscription_date_start=$this->db->jdate($obj->dateh);
|
||||
$this->first_subscription_date_end=$this->db->jdate($obj->datef);
|
||||
$this->first_subscription_amount=$obj->subscription;
|
||||
$this->first_subscription_date = $this->db->jdate($obj->datec);
|
||||
$this->first_subscription_date_start = $this->db->jdate($obj->dateh);
|
||||
$this->first_subscription_date_end = $this->db->jdate($obj->datef);
|
||||
$this->first_subscription_amount = $obj->subscription;
|
||||
}
|
||||
$this->last_subscription_date=$this->db->jdate($obj->datec);
|
||||
$this->last_subscription_date_start=$this->db->jdate($obj->datef);
|
||||
$this->last_subscription_date_end=$this->db->jdate($obj->datef);
|
||||
$this->last_subscription_amount=$obj->subscription;
|
||||
$this->last_subscription_date = $this->db->jdate($obj->datec);
|
||||
$this->last_subscription_date_start = $this->db->jdate($obj->datef);
|
||||
$this->last_subscription_date_end = $this->db->jdate($obj->datef);
|
||||
$this->last_subscription_amount = $obj->subscription;
|
||||
|
||||
$subscription=new Subscription($this->db);
|
||||
$subscription->id=$obj->rowid;
|
||||
$subscription->fk_adherent=$obj->fk_adherent;
|
||||
$subscription->amount=$obj->subscription;
|
||||
$subscription->note=$obj->note;
|
||||
$subscription->fk_bank=$obj->fk_bank;
|
||||
$subscription->datem=$this->db->jdate($obj->datem);
|
||||
$subscription->datec=$this->db->jdate($obj->datec);
|
||||
$subscription->dateh=$this->db->jdate($obj->dateh);
|
||||
$subscription->datef=$this->db->jdate($obj->datef);
|
||||
$subscription = new Subscription($this->db);
|
||||
$subscription->id = $obj->rowid;
|
||||
$subscription->fk_adherent = $obj->fk_adherent;
|
||||
$subscription->fk_type = $obj->fk_type;
|
||||
$subscription->amount = $obj->subscription;
|
||||
$subscription->note = $obj->note;
|
||||
$subscription->fk_bank = $obj->fk_bank;
|
||||
$subscription->datem = $this->db->jdate($obj->datem);
|
||||
$subscription->datec = $this->db->jdate($obj->datec);
|
||||
$subscription->dateh = $this->db->jdate($obj->dateh);
|
||||
$subscription->datef = $this->db->jdate($obj->datef);
|
||||
|
||||
$this->subscriptions[]=$subscription;
|
||||
$this->subscriptions[] = $subscription;
|
||||
|
||||
$i++;
|
||||
}
|
||||
@@ -1425,7 +1426,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error().' sql='.$sql;
|
||||
$this->error = $this->db->error().' sql='.$sql;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -691,11 +691,11 @@ if ($massaction == 'confirm_createbills') // Create bills from orders
|
||||
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
$desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle);
|
||||
$desc = ($lines[$i]->desc ? $lines[$i]->desc : '');
|
||||
// If we build one invoice for several order, we must put the invoice of order on the line
|
||||
if (!empty($createbills_onebythird))
|
||||
{
|
||||
$desc = dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day', $langs));
|
||||
$desc = dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day'));
|
||||
}
|
||||
|
||||
if ($lines[$i]->subprice < 0)
|
||||
|
||||
@@ -1882,6 +1882,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
|
||||
$format = str_replace('%A', '__A__', $format);
|
||||
}
|
||||
|
||||
|
||||
// Analyze date
|
||||
$reg = array();
|
||||
if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000
|
||||
|
||||
@@ -1015,7 +1015,9 @@ class ExpenseReport extends CommonObject
|
||||
public function fetch_lines()
|
||||
{
|
||||
// phpcs:enable
|
||||
$this->lines = array();
|
||||
global $conf;
|
||||
|
||||
$this->lines = array();
|
||||
|
||||
$sql = ' SELECT de.rowid, de.comments, de.qty, de.value_unit, de.date, de.rang,';
|
||||
$sql .= ' de.'.$this->fk_element.', de.fk_c_type_fees, de.fk_c_exp_tax_cat, de.fk_projet as fk_project, de.tva_tx, de.fk_ecm_files,';
|
||||
|
||||
Reference in New Issue
Block a user