Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
7bb820826f
@ -407,6 +407,7 @@ class Propal extends CommonObject
|
|||||||
$this->line->date_start=$date_start;
|
$this->line->date_start=$date_start;
|
||||||
$this->line->date_end=$date_end;
|
$this->line->date_end=$date_end;
|
||||||
|
|
||||||
|
|
||||||
// infos marge
|
// infos marge
|
||||||
$this->line->fk_fournprice = $fk_fournprice;
|
$this->line->fk_fournprice = $fk_fournprice;
|
||||||
$this->line->pa_ht = $pa_ht;
|
$this->line->pa_ht = $pa_ht;
|
||||||
@ -2817,7 +2818,7 @@ class PropaleLigne
|
|||||||
$sql.= " ".price2num($this->tva_tx).",";
|
$sql.= " ".price2num($this->tva_tx).",";
|
||||||
$sql.= " ".price2num($this->localtax1_tx).",";
|
$sql.= " ".price2num($this->localtax1_tx).",";
|
||||||
$sql.= " ".price2num($this->localtax2_tx).",";
|
$sql.= " ".price2num($this->localtax2_tx).",";
|
||||||
$sql.= " ".($this->subprice?price2num($this->subprice):'null').",";
|
$sql.= " ".($this->subprice?price2num($this->subprice):"null").",";
|
||||||
$sql.= " ".price2num($this->remise_percent).",";
|
$sql.= " ".price2num($this->remise_percent).",";
|
||||||
$sql.= " ".(isset($this->info_bits)?"'".$this->info_bits."'":"null").",";
|
$sql.= " ".(isset($this->info_bits)?"'".$this->info_bits."'":"null").",";
|
||||||
$sql.= " ".price2num($this->total_ht).",";
|
$sql.= " ".price2num($this->total_ht).",";
|
||||||
|
|||||||
@ -239,7 +239,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Ref").'</td>';
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.($_POST["ref"]?$_POST["ref"]:$account->ref).'"></td></tr>';
|
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.($_POST["ref"]?$_POST["ref"]:$account->ref).'" maxlength="12"></td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
|
||||||
|
|||||||
@ -186,7 +186,7 @@ if (! empty($usemargins))
|
|||||||
}
|
}
|
||||||
options += '>'+this.label+'</option>';
|
options += '>'+this.label+'</option>';
|
||||||
});
|
});
|
||||||
options += '<option value=null><?php echo $langs->trans("InputPrice"); ?></option>';
|
options += '<option value=""><?php echo $langs->trans("InputPrice"); ?></option>';
|
||||||
$("#buying_price").hide();
|
$("#buying_price").hide();
|
||||||
$("#fournprice").html(options).show();
|
$("#fournprice").html(options).show();
|
||||||
$("#fournprice").change(function() {
|
$("#fournprice").change(function() {
|
||||||
|
|||||||
@ -182,11 +182,11 @@ if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPr
|
|||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
$sql.= " GROUP BY f.rowid";
|
$sql.= " GROUP BY f.rowid";
|
||||||
else
|
else
|
||||||
$sql.= " GROUP BY d.fk_product";
|
$sql.= " GROUP BY d.fk_product, p.label, p.rowid, p.fk_product_type, p.ref, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.rowid";
|
||||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||||
// TODO: calculate total to display then restore pagination
|
// TODO: calculate total to display then restore pagination
|
||||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
dol_syslog('margin::productMargin.php sql='.$sql,LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -144,7 +144,7 @@ if ($socid > 0)
|
|||||||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
|
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
|
||||||
$sql .= " AND d.buy_price_ht <> 0";
|
$sql .= " AND d.buy_price_ht <> 0";
|
||||||
$sql.= " GROUP BY f.rowid";
|
$sql.= " GROUP BY f.rowid, s.nom, s.rowid, s.code_client, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
|
||||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||||
// TODO: calculate total to display then restore pagination
|
// TODO: calculate total to display then restore pagination
|
||||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user