Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
714ec2ce48
@ -2623,7 +2623,7 @@ if ($resql) {
|
||||
|
||||
// Import key
|
||||
if (!empty($arrayfields['c.import_key']['checked'])) {
|
||||
print '<td class="nowrap center">'.$obj->import_key.'</td>';
|
||||
print '<td class="nowrap center">'.dol_escape_htmltag($obj->import_key).'</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (14
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1402, 140, '14','0','VAT rate - intermediary',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1403, 140, '8','0','VAT rate - reduced', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1404, 140, '3','0','VAT rate - super-reduced', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1405, 140, '17','0','VAT rate - standard',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1405, 140, '16','0','VAT rate - standard',1);
|
||||
|
||||
-- MALI (id country=147)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1471, 147, '0','0','VAT rate 0', 1);
|
||||
|
||||
@ -401,7 +401,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// Back to draft
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&token='.newToken().'&confirm=yes">'.$langs->trans("SetToDraft").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -591,10 +591,8 @@ if (empty($reshook)) {
|
||||
$prod_entry_mode = GETPOST('prod_entry_mode', 'aZ09');
|
||||
if ($prod_entry_mode == 'free') {
|
||||
$idprod = 0;
|
||||
$tva_tx = (GETPOST('tva_tx', 'alpha') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx', 'alpha'))) : 0);
|
||||
} else {
|
||||
$idprod = GETPOST('idprod', 'int');
|
||||
$tva_tx = '';
|
||||
}
|
||||
|
||||
$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
|
||||
|
||||
@ -2584,7 +2584,7 @@ class SupplierProposal extends CommonObject
|
||||
// For other object, here we call fetch_lines. But fetch_lines does not exists on supplier proposal
|
||||
|
||||
$sql = 'SELECT pt.rowid, pt.label as custom_label, pt.description, pt.fk_product, pt.fk_remise_except,';
|
||||
$sql .= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,';
|
||||
$sql .= ' pt.qty, pt.tva_tx, pt.vat_src_code, pt.remise_percent, pt.subprice, pt.info_bits,';
|
||||
$sql .= ' pt.total_ht, pt.total_tva, pt.total_ttc, pt.fk_product_fournisseur_price as fk_fournprice, pt.buy_price_ht as pa_ht, pt.special_code, pt.localtax1_tx, pt.localtax2_tx,';
|
||||
$sql .= ' pt.product_type, pt.rang, pt.fk_parent_line,';
|
||||
$sql .= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,';
|
||||
@ -2620,6 +2620,7 @@ class SupplierProposal extends CommonObject
|
||||
$this->lines[$i]->fk_remise_except = $obj->fk_remise_except;
|
||||
$this->lines[$i]->remise_percent = $obj->remise_percent;
|
||||
$this->lines[$i]->tva_tx = $obj->tva_tx;
|
||||
$this->lines[$i]->vat_src_code = $obj->vat_src_code;
|
||||
$this->lines[$i]->info_bits = $obj->info_bits;
|
||||
$this->lines[$i]->total_ht = $obj->total_ht;
|
||||
$this->lines[$i]->total_tva = $obj->total_tva;
|
||||
@ -2988,6 +2989,9 @@ class SupplierProposalLine extends CommonObjectLine
|
||||
if (empty($this->tva_tx)) {
|
||||
$this->tva_tx = 0;
|
||||
}
|
||||
if (empty($this->vat_src_code)) {
|
||||
$this->vat_src_code = '';
|
||||
}
|
||||
if (empty($this->localtax1_tx)) {
|
||||
$this->localtax1_tx = 0;
|
||||
}
|
||||
@ -3056,7 +3060,7 @@ class SupplierProposalLine extends CommonObjectLine
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'supplier_proposaldet';
|
||||
$sql .= ' (fk_supplier_proposal, fk_parent_line, label, description, fk_product, product_type,';
|
||||
$sql .= ' date_start, date_end,';
|
||||
$sql .= ' fk_remise_except, qty, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,';
|
||||
$sql .= ' fk_remise_except, qty, tva_tx, vat_src_code, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,';
|
||||
$sql .= ' subprice, remise_percent, ';
|
||||
$sql .= ' info_bits, ';
|
||||
$sql .= ' total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_product_fournisseur_price, buy_price_ht, special_code, rang,';
|
||||
@ -3073,6 +3077,7 @@ class SupplierProposalLine extends CommonObjectLine
|
||||
$sql .= " ".($this->fk_remise_except ? ((int) $this->fk_remise_except) : "null").",";
|
||||
$sql .= " ".price2num($this->qty, 'MS').",";
|
||||
$sql .= " ".price2num($this->tva_tx).",";
|
||||
$sql .= " '".$this->db->escape($this->vat_src_code)."',";
|
||||
$sql .= " ".price2num($this->localtax1_tx).",";
|
||||
$sql .= " ".price2num($this->localtax2_tx).",";
|
||||
$sql .= " '".$this->db->escape($this->localtax1_type)."',";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user