Merge remote-tracking branch 'origin/3.7' into develop
This commit is contained in:
commit
fc8a822f1d
@ -237,6 +237,7 @@ FIX [ bug #3198 ] Trigger LINECONTRACT_INSERT passes Contrat as $object instead
|
|||||||
FIX: Not showing delivery date on rouget pdf
|
FIX: Not showing delivery date on rouget pdf
|
||||||
FIX: Not showing task extrafields when creating from left menu
|
FIX: Not showing task extrafields when creating from left menu
|
||||||
FIX [ bug #3288 ] Tasks box is not properly drawn
|
FIX [ bug #3288 ] Tasks box is not properly drawn
|
||||||
|
FIX [ bug #3211 ] Outstading bill amount of a client showed wrong amounts
|
||||||
|
|
||||||
NEW: Created new ContratLigne::insert function
|
NEW: Created new ContratLigne::insert function
|
||||||
|
|
||||||
@ -684,6 +685,9 @@ Fix: [ bug #2570 ] [Contacts] Page should not process if ID is invalid
|
|||||||
Fix: [ bug #3268 ] SQL error when accessing thirdparty log page without a socid parameter
|
Fix: [ bug #3268 ] SQL error when accessing thirdparty log page without a socid parameter
|
||||||
Fix: [ bug #3180 ] formObjectOptions hook when editing thirdparty card does not print result
|
Fix: [ bug #3180 ] formObjectOptions hook when editing thirdparty card does not print result
|
||||||
Fix: [ bug #1791 ] Margin menu not available if any Finance module is not enabled
|
Fix: [ bug #1791 ] Margin menu not available if any Finance module is not enabled
|
||||||
|
Fix: [ bug #3310 ] OrderLine::fetch, FactureLigne::fetch and PropaleLigne::fetch do not return anything
|
||||||
|
Fix: [ bug #3206 ] PropaleLigne, OrderLine and FactureLigne given to triggers through update function does not contain all the information
|
||||||
|
Fix: [ bug #3313 ] Error enabling module with PostgreSQL database
|
||||||
|
|
||||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||||
|
|||||||
@ -643,16 +643,16 @@ class Propal extends CommonObject
|
|||||||
$price = $pu - $remise;
|
$price = $pu - $remise;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update line
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
$this->line=new PropaleLigne($this->db);
|
$line = new PropaleLigne($this->db);
|
||||||
|
$line->fetch($rowid);
|
||||||
|
|
||||||
|
$staticline = clone $line;
|
||||||
|
|
||||||
|
$line->oldline = $staticline;
|
||||||
|
$this->line = $line;
|
||||||
$this->line->context = $this->context;
|
$this->line->context = $this->context;
|
||||||
|
|
||||||
// Stock previous line records
|
|
||||||
$staticline=new PropaleLigne($this->db);
|
|
||||||
$staticline->fetch($rowid);
|
|
||||||
$this->line->oldline = $staticline;
|
|
||||||
|
|
||||||
// Reorder if fk_parent_line change
|
// Reorder if fk_parent_line change
|
||||||
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
||||||
{
|
{
|
||||||
@ -3107,10 +3107,12 @@ class PropaleLigne extends CommonObjectLine
|
|||||||
$this->date_end = $this->db->jdate($objp->date_end);
|
$this->date_end = $this->db->jdate($objp->date_end);
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2503,16 +2503,16 @@ class Commande extends CommonOrder
|
|||||||
$price = ($pu - $remise);
|
$price = ($pu - $remise);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update line
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
$this->line=new OrderLine($this->db);
|
$line = new OrderLine($this->db);
|
||||||
|
$line->fetch($rowid);
|
||||||
|
|
||||||
|
$staticline = clone $line;
|
||||||
|
|
||||||
|
$line->oldline = $staticline;
|
||||||
|
$this->line = $line;
|
||||||
$this->line->context = $this->context;
|
$this->line->context = $this->context;
|
||||||
|
|
||||||
// Stock previous line records
|
|
||||||
$staticline=new OrderLine($this->db);
|
|
||||||
$staticline->fetch($rowid);
|
|
||||||
$this->line->oldline = $staticline;
|
|
||||||
|
|
||||||
// Reorder if fk_parent_line change
|
// Reorder if fk_parent_line change
|
||||||
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
||||||
{
|
{
|
||||||
@ -3471,10 +3471,12 @@ class OrderLine extends CommonOrderLine
|
|||||||
$this->date_end = $this->db->jdate($objp->date_end);
|
$this->date_end = $this->db->jdate($objp->date_end);
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1244,7 +1244,6 @@ class AccountLine extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2345,16 +2345,26 @@ class Facture extends CommonInvoice
|
|||||||
$pu_tva = $tabprice[4];
|
$pu_tva = $tabprice[4];
|
||||||
$pu_ttc = $tabprice[5];
|
$pu_ttc = $tabprice[5];
|
||||||
|
|
||||||
// Update line into database
|
// Old properties: $price, $remise (deprecated)
|
||||||
$this->line=new FactureLigne($this->db);
|
$price = $pu;
|
||||||
|
$remise = 0;
|
||||||
|
if ($remise_percent > 0)
|
||||||
|
{
|
||||||
|
$remise = round(($pu * $remise_percent / 100),2);
|
||||||
|
$price = ($pu - $remise);
|
||||||
|
}
|
||||||
|
$price = price2num($price);
|
||||||
|
|
||||||
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
|
$line = new FactureLigne($this->db);
|
||||||
|
$line->fetch($rowid);
|
||||||
|
|
||||||
|
$staticline = clone $line;
|
||||||
|
|
||||||
|
$line->oldline = $staticline;
|
||||||
|
$this->line = $line;
|
||||||
$this->line->context = $this->context;
|
$this->line->context = $this->context;
|
||||||
|
|
||||||
// Stock previous line records
|
|
||||||
$staticline=new FactureLigne($this->db);
|
|
||||||
$staticline->fetch($rowid);
|
|
||||||
$this->line->oldline = $staticline;
|
|
||||||
|
|
||||||
// Reorder if fk_parent_line change
|
// Reorder if fk_parent_line change
|
||||||
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
||||||
{
|
{
|
||||||
@ -3843,10 +3853,12 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
$this->fk_prev_id = $objp->fk_prev_id;
|
$this->fk_prev_id = $objp->fk_prev_id;
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,8 +65,8 @@ $v->setPhoneNumber($contact->phone_pro, "PREF;WORK;VOICE");
|
|||||||
$v->setPhoneNumber($contact->phone_mobile, "CELL;VOICE");
|
$v->setPhoneNumber($contact->phone_mobile, "CELL;VOICE");
|
||||||
$v->setPhoneNumber($contact->fax, "WORK;FAX");
|
$v->setPhoneNumber($contact->fax, "WORK;FAX");
|
||||||
|
|
||||||
$v->setAddress("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->country_code?$contact->country_id:''), "WORK;POSTAL");
|
$v->setAddress("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->country_code?$contact->country:''), "WORK;POSTAL");
|
||||||
$v->setLabel("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->country_code?$contact->country_id:''), "WORK");
|
$v->setLabel("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->country_code?$contact->country:''), "WORK");
|
||||||
$v->setEmail($contact->email,'internet,pref');
|
$v->setEmail($contact->email,'internet,pref');
|
||||||
$v->setNote($contact->note);
|
$v->setNote($contact->note);
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ if ($company->id)
|
|||||||
$v->setURL($company->url, "WORK");
|
$v->setURL($company->url, "WORK");
|
||||||
if (! $contact->phone_pro) $v->setPhoneNumber($company->phone, "WORK;VOICE");
|
if (! $contact->phone_pro) $v->setPhoneNumber($company->phone, "WORK;VOICE");
|
||||||
if (! $contact->fax) $v->setPhoneNumber($company->fax, "WORK;FAX");
|
if (! $contact->fax) $v->setPhoneNumber($company->fax, "WORK;FAX");
|
||||||
if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country_code, "WORK;POSTAL");
|
if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country, "WORK;POSTAL");
|
||||||
if ($company->email != $contact->email) $v->setEmail($company->email,'internet');
|
if ($company->email != $contact->email) $v->setEmail($company->email,'internet');
|
||||||
// Si contact lie a un tiers non de type "particulier"
|
// Si contact lie a un tiers non de type "particulier"
|
||||||
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
|
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
|
||||||
|
|||||||
@ -1334,7 +1334,6 @@ print $sql;
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
//var_dump($this->menu); exit;
|
|
||||||
foreach ($this->menu as $key => $value)
|
foreach ($this->menu as $key => $value)
|
||||||
{
|
{
|
||||||
$menu = new Menubase($this->db);
|
$menu = new Menubase($this->db);
|
||||||
@ -1343,11 +1342,9 @@ print $sql;
|
|||||||
if (! $this->menu[$key]['fk_menu'])
|
if (! $this->menu[$key]['fk_menu'])
|
||||||
{
|
{
|
||||||
$menu->fk_menu=0;
|
$menu->fk_menu=0;
|
||||||
//print 'aaa'.$this->menu[$key]['fk_menu'];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//print 'xxx'.$this->menu[$key]['fk_menu'];exit;
|
|
||||||
$foundparent=0;
|
$foundparent=0;
|
||||||
$fk_parent=$this->menu[$key]['fk_menu'];
|
$fk_parent=$this->menu[$key]['fk_menu'];
|
||||||
if (preg_match('/^r=/',$fk_parent)) // old deprecated method
|
if (preg_match('/^r=/',$fk_parent)) // old deprecated method
|
||||||
|
|||||||
@ -1192,6 +1192,8 @@ class Expedition extends CommonObject
|
|||||||
$line->details_entrepot[] = $detail_entrepot;
|
$line->details_entrepot[] = $detail_entrepot;
|
||||||
|
|
||||||
$line->line_id = $obj->line_id;
|
$line->line_id = $obj->line_id;
|
||||||
|
$line->rowid = $obj->line_id; // TODO deprecated
|
||||||
|
$line->id = $obj->line_id;
|
||||||
$line->fk_origin_line = $obj->fk_origin_line;
|
$line->fk_origin_line = $obj->fk_origin_line;
|
||||||
$line->origin_line_id = $obj->fk_origin_line; // TODO deprecated
|
$line->origin_line_id = $obj->fk_origin_line; // TODO deprecated
|
||||||
$line->fk_product = $obj->fk_product;
|
$line->fk_product = $obj->fk_product;
|
||||||
|
|||||||
@ -3291,6 +3291,7 @@ class Societe extends CommonObject
|
|||||||
$sql .= " AND fk_statut <> 0"; // Not a draft
|
$sql .= " AND fk_statut <> 0"; // Not a draft
|
||||||
//$sql .= " AND (fk_statut <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason
|
//$sql .= " AND (fk_statut <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason
|
||||||
$sql .= " AND fk_statut <> 3"; // Not abandonned
|
$sql .= " AND fk_statut <> 3"; // Not abandonned
|
||||||
|
$sql .= " AND fk_statut <> 2"; // Not clasified as paid
|
||||||
|
|
||||||
dol_syslog("get_OutstandingBill", LOG_DEBUG);
|
dol_syslog("get_OutstandingBill", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user