Skip to content
Snippets Groups Projects
Commit b787b1a3 authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #5828 from olsesacl/contracdet_add_edit

FIX: Contract Error insert or edit empty value MYSQL 5.7
parents a7fbb1e3 9024c225
No related branches found
No related tags found
No related merge requests found
......@@ -680,8 +680,8 @@ if (empty($reshook))
$objectline->qty=GETPOST('elqty');
$objectline->remise_percent=GETPOST('elremise_percent');
$objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0
$objectline->localtax1_tx=$localtax1_tx;
$objectline->localtax2_tx=$localtax2_tx;
$objectline->localtax1_tx=is_numeric($localtax1_tx)?$localtax1_tx:0;
$objectline->localtax2_tx=is_numeric($localtax2_tx)?$localtax2_tx:0;
$objectline->date_ouverture_prevue=$date_start_update;
$objectline->date_ouverture=$date_start_real_update;
$objectline->date_fin_validite=$date_end_update;
......
......@@ -1307,6 +1307,8 @@ class Contrat extends CommonObject
if (empty($info_bits)) $info_bits=0;
if (empty($pu_ht) || ! is_numeric($pu_ht)) $pu_ht=0;
if (empty($pu_ttc)) $pu_ttc=0;
if (empty($txlocaltax1) || ! is_numeric($txlocaltax1)) $txlocaltax1=0;
if (empty($txlocaltax2) || ! is_numeric($txlocaltax2)) $txlocaltax2=0;
if ($price_base_type=='HT')
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment