develop_dict
This commit is contained in:
Regis Houssin
2017-07-11 19:10:22 +02:00
2445 changed files with 23967 additions and 10111 deletions

View File

@@ -1359,10 +1359,10 @@ class Commande extends CommonOrder
$this->line->vat_src_code=$vat_src_code;
$this->line->tva_tx=$txtva;
$this->line->localtax1_tx=$txlocaltax1;
$this->line->localtax2_tx=$txlocaltax2;
$this->line->localtax1_type = $localtaxes_type[0];
$this->line->localtax2_type = $localtaxes_type[2];
$this->line->localtax1_tx=$localtaxes_type[1];
$this->line->localtax2_tx=$localtaxes_type[3];
$this->line->localtax1_type=$localtaxes_type[0];
$this->line->localtax2_type=$localtaxes_type[2];
$this->line->fk_product=$fk_product;
$this->line->product_type=$product_type;
$this->line->fk_remise_except=$fk_remise_except;
@@ -1411,7 +1411,7 @@ class Commande extends CommonOrder
if (! empty($fk_parent_line)) $this->line_order(true,'DESC');
// Mise a jour informations denormalisees au niveau de la commande meme
$result=$this->update_price(1,'auto'); // This method is designed to add line from user input so total calculation must be done using 'auto' mode.
$result=$this->update_price(1,'auto',0,$mysoc); // This method is designed to add line from user input so total calculation must be done using 'auto' mode.
if ($result > 0)
{
$this->db->commit();
@@ -2778,9 +2778,10 @@ class Commande extends CommonOrder
* @param array $array_options extrafields array
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @param double $pu_ht_devise Amount in currency
* @param int $notrigger disable line update trigger
* @return int < 0 if KO, > 0 if OK
*/
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null, $pu_ht_devise = 0)
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0)
{
global $conf, $mysoc, $langs, $user;
@@ -2935,7 +2936,7 @@ class Commande extends CommonOrder
$this->line->array_options=$array_options;
}
$result=$this->line->update($user);
$result=$this->line->update($user, $notrigger);
if ($result > 0)
{
// Reorder if child line
@@ -3243,7 +3244,8 @@ class Commande extends CommonOrder
$response->nbtodo++;
$generic_commande->statut = $obj->fk_statut;
$generic_commande->date_livraison = $obj->delivery_date;
$generic_commande->date_commande = $this->db->jdate($obj->date_commande);
$generic_commande->date_livraison = $this->db->jdate($obj->delivery_date);
if ($generic_commande->hasDelay()) {
$response->nbtodolate++;
@@ -3370,14 +3372,14 @@ class Commande extends CommonOrder
* Return clicable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param int $option Where point the link (0=> main card, 1,2 => shipment)
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param int $max Max length to show
* @param int $short ???
* @param int $notooltip 1=Disable tooltip
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/
function getNomUrl($withpicto=0, $option=0, $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1)
function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1)
{
global $conf, $langs, $user;
@@ -3385,7 +3387,7 @@ class Commande extends CommonOrder
$result='';
if (! empty($conf->expedition->enabled) && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
if (! empty($conf->expedition->enabled) && ($option == '1' || $option == '2')) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
else $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id;
if ($option !== 'nolink')