Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/tpl/objectline_create.tpl.php htdocs/exports/export.php htdocs/fourn/class/fournisseur.facture.class.php htdocs/fourn/facture/card.php
This commit is contained in:
commit
ddc52b7199
@ -572,6 +572,22 @@ class Adherent extends CommonObject
|
||||
$sql.= ", fk_user_mod = ".($user->id>0?$user->id:'null'); // Can be null because member can be create by a guest
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
// If we change the type of membership, we set also label of new type
|
||||
if (! empty($this->oldcopy) && $this->typeid != $this->oldcopy->typeid)
|
||||
{
|
||||
$sql2 = "SELECT libelle as label";
|
||||
$sql2.= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||
$sql2.= " WHERE rowid = ".$this->typeid;
|
||||
$resql2 = $this->db->query($sql2);
|
||||
if ($resql2)
|
||||
{
|
||||
while ($obj=$this->db->fetch_object($resql2))
|
||||
{
|
||||
$this->type=$obj->label;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::update update member", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -263,15 +263,17 @@ else {
|
||||
if ($senderissupplier != 2)
|
||||
{
|
||||
$ajaxoptions=array(
|
||||
'update' => array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key
|
||||
'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
|
||||
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo)
|
||||
'update' => array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key
|
||||
'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
|
||||
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo)
|
||||
);
|
||||
$alsoproductwithnosupplierprice=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ajaxoptions = array();
|
||||
$ajaxoptions = array(
|
||||
'update' => array('remise_percent' => 'discount') // html id tags that will be edited with each ajax json response key
|
||||
);
|
||||
$alsoproductwithnosupplierprice=1;
|
||||
}
|
||||
|
||||
|
||||
@ -743,9 +743,11 @@ if ($step == 3 && $datatoexport)
|
||||
|
||||
// un formulaire en plus pour recuperer les filtres
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?step=4&action=submitFormField&datatoexport='.$datatoexport.'" name="FilterField" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Entities").'</td>';
|
||||
//print '<td>'.$langs->trans("ExportableFields").'</td>';
|
||||
|
||||
@ -1555,9 +1555,10 @@ class FactureFournisseur extends CommonInvoice
|
||||
* @param int $origin_id id origin document
|
||||
* @param double $pu_ht_devise Amount in currency
|
||||
* @param string $ref_supplier Supplier ref
|
||||
* @param string $special_code Special code
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = '', $price_base_type = 'HT', $type = 0, $rang = -1, $notrigger = false, $array_options = 0, $fk_unit = null, $origin_id = 0, $pu_ht_devise = 0, $ref_supplier = '')
|
||||
public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = '', $price_base_type = 'HT', $type = 0, $rang = -1, $notrigger = false, $array_options = 0, $fk_unit = null, $origin_id = 0, $pu_ht_devise = 0, $ref_supplier = '', $special_code = '')
|
||||
{
|
||||
global $langs, $mysoc, $conf;
|
||||
|
||||
@ -1727,7 +1728,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$this->line->rang=$rang;
|
||||
$this->line->info_bits=$info_bits;
|
||||
|
||||
$this->line->special_code=$this->special_code;
|
||||
$this->line->special_code=((string) $special_code != '' ? $special_code : $this->special_code);
|
||||
$this->line->fk_parent_line=$this->fk_parent_line;
|
||||
$this->line->origin=$this->origin;
|
||||
$this->line->origin_id=$origin_id;
|
||||
|
||||
@ -949,7 +949,8 @@ if (empty($reshook))
|
||||
$lines[$i]->fk_unit,
|
||||
$lines[$i]->id,
|
||||
0,
|
||||
$lines[$i]->ref_supplier
|
||||
$lines[$i]->ref_supplier,
|
||||
$lines[$i]->special_code
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user