diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 01008fce841..ed174a380a4 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1788,8 +1788,8 @@ class Facture extends CommonInvoice // Rename directory if dir was a temporary ref if (preg_match('/^[\(]?PROV/i', $this->ref)) { - // On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // Rename of object directory ($this->ref = old ref, $num = new ref) + // to not lose the linked files $facref = dol_sanitizeFileName($this->ref); $snumfa = dol_sanitizeFileName($num); $dirsource = $conf->facture->dir_output.'/'.$facref; @@ -1977,7 +1977,7 @@ class Facture extends CommonInvoice function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='',$array_option=0) { global $mysoc; - + $facid=$this->id; dol_syslog(get_class($this)."::Addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type", LOG_DEBUG); @@ -2023,9 +2023,9 @@ class Facture extends CommonInvoice // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - + $localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc); - + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type,'',$localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; @@ -2148,7 +2148,7 @@ class Facture extends CommonInvoice function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_option=0) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - + global $mysoc; dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1, $txlocaltax2, $price_base_type, $info_bits, $type, $fk_parent_line", LOG_DEBUG); @@ -2176,9 +2176,9 @@ class Facture extends CommonInvoice // Calculate total with, without tax and tax from qty, pu, remise_percent and txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - + $localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc); - + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type,'',$localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 12d474b72dd..315a2b9edff 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -274,54 +274,63 @@ class Contrat extends CommonObject } /** - * Validate a contract + * Validate a contract * - * @param User $user Objet User - * @return int <0 if KO, >0 if OK + * @param User $user Objet User + * @param string $force_number Reference to force on contract (not implemented yet) + * @return int <0 if KO, >0 if OK */ - function validate($user) + function validate($user, $force_number='') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; global $langs, $conf; + $now=dol_now(); + $error=0; + dol_syslog(get_class($this).'::validate user='.$user->id.', force_number='.$force_number); - // Definition du nom de module de numerotation de commande - $soc = new Societe($this->db); - $soc->fetch($this->socid); - // Class of company linked to order - $result=$soc->set_as_client(); + $this->db->begin(); + + $this->fetch_thirdparty(); + + // A contract is validated so we can move thirdparty to status customer + $result=$this->thirdparty->set_as_client(); // Define new ref if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref))) { - $num = $this->getNextNumRef($soc); + $num = $this->getNextNumRef($this->thirdparty); } else { $num = $this->ref; } - $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET ref = '".$num."', statut = 1"; - $sql .= " WHERE rowid = ".$this->id . " AND statut = 0"; - - $resql = $this->db->query($sql); - if ($resql) + if ($num) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_VALIDATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - + $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET ref = '".$num."', statut = 1"; + //$sql.= ", fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'"; + $sql .= " WHERE rowid = ".$this->id . " AND statut = 0"; + + dol_syslog(get_class($this)."::validate sql=".$sql); + $resql = $this->db->query($sql); + if (! $resql) + { + dol_syslog(get_class($this)."::validate Echec update - 10 - sql=".$sql, LOG_ERR); + dol_print_error($this->db); + $error++; + } + if (! $error) { + $this->oldref = ''; + // Rename directory if dir was a temporary ref if (preg_match('/^[\(]?PROV/i', $this->ref)) { - // Rename of propal directory ($this->ref = old ref, $num = new ref) + // Rename of object directory ($this->ref = old ref, $num = new ref) // to not lose the linked files $facref = dol_sanitizeFileName($this->ref); $snumfa = dol_sanitizeFileName($num); @@ -330,28 +339,56 @@ class Contrat extends CommonObject if (file_exists($dirsource)) { dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); - + if (@rename($dirsource, $dirdest)) { + $this->oldref = $facref; + dol_syslog("Rename ok"); // Deleting old PDF in new rep dol_delete_file($conf->contract->dir_output.'/'.$snumfa.'/'.$facref.'*.*'); } } } - - return 1; } - else + + // Set new ref and define current statut + if (! $error) { - return -1; + $this->ref = $num; + $this->statut=1; + $this->brouillon=0; + $this->date_validation=$now; + } + + // Trigger calls + if (! $error) + { + // Appel des triggers + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('CONTRACT_VALIDATE',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers } } else { - $this->error=$this->db->error(); + $error++; + } + + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + $this->error=$this->db->lasterror(); return -1; } + } @@ -966,19 +1003,19 @@ class Contrat extends CommonObject // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - + $localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc); - + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,'', $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; $total_localtax1= $tabprice[9]; $total_localtax2= $tabprice[10]; - + $localtax1_type=$localtaxes_type[0]; $localtax2_type=$localtaxes_type[2]; - + // TODO A virer // Anciens indicateurs: $price, $remise (a ne plus utiliser) $remise = 0; @@ -1114,19 +1151,19 @@ class Contrat extends CommonObject // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - + $localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc); - + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtaxtx1, $txlocaltaxtx2, 0, $price_base_type, $info_bits, 1, '', $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; $total_localtax1= $tabprice[9]; $total_localtax2= $tabprice[10]; - + $localtax1_type=$localtaxes_type[0]; $localtax2_type=$localtaxes_type[2]; - + // TODO A virer // Anciens indicateurs: $price, $remise (a ne plus utiliser) $remise = 0; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e2dc4db52af..de2e9e39692 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2329,7 +2329,7 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar * Get title line of an array * * @param string $name Label of field - * @param int $thead For thead format (0 by default) + * @param int $thead 0=To use with standard table forat, 1=To use inside , 2=To use with
* @param string $file Url used when we click on sort picto * @param string $field Field to use for new sorting. Empty if this field is not sortable. * @param string $begin ("" by defaut) @@ -2347,10 +2347,13 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m $sortorder=strtoupper($sortorder); $out=''; + $tag='th'; + if ($thead==2) $tag='div'; + // If field is used as sort criteria we use a specific class // Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom") - if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= ''; - else $out.= ''; + if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel" '. $moreattrib.'>'; + else $out.= '<'.$tag.' class="liste_titre" '. $moreattrib.'>'; if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field { @@ -2397,7 +2400,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m } } } - $out.=''; + $out.=''; return $out; } diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 6559e8043c0..f8f8524743a 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -515,22 +515,7 @@ function quotedPrintEncode($str,$forcal=0) function quotedPrintDecode($str) { $out = preg_replace('/=\r?\n/', '', $str); - /* - * preg_replace /e modifier is deprecated in PHP 5.5 - * but anonymous functions for use in preg_replace_callback are only available from 5.3.0 - */ - if (version_compare(PHP_VERSION, '5.3.0') >= 0) { - $out = preg_replace_callback( - '/=([A-F0-9]{2})/', - function ($m) { - return chr(hexdec($m[1])); - }, - $out - ); - } else { - $out = preg_replace('/=([A-F0-9]{2})/e', chr(hexdec('\\1')), $out); - } - + $out = quoted_printable_decode($out); // Available with PHP 4+ return trim($out); } diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 05372efbf30..f6b7abcf9f8 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -301,6 +301,7 @@ ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_cond_reglement integer NULL; insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (9,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1); +ALTER TABLE llx_contratdet ADD column product_type integer DEFAULT 1 after total_ttc; create table llx_contrat_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_contratdet.sql b/htdocs/install/mysql/tables/llx_contratdet.sql index 9424bc4b4b4..78091d3a3d9 100644 --- a/htdocs/install/mysql/tables/llx_contratdet.sql +++ b/htdocs/install/mysql/tables/llx_contratdet.sql @@ -52,6 +52,7 @@ create table llx_contratdet total_localtax1 double(24,8) DEFAULT 0, -- Total Local tax 1 de la ligne total_localtax2 double(24,8) DEFAULT 0, -- Total Local tax 2 de la ligne total_ttc double(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantite et incluant remise ligne et globale + product_type integer DEFAULT 1, -- Product type (1=service by default) info_bits integer DEFAULT 0, -- TVA NPR ou non buy_price_ht double(24,8) DEFAULT NULL, -- buying price diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 34afeaffb41..de9b4ebd623 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -34,8 +34,10 @@ LastMovements=Last movements Units=Units Unit=Unit StockCorrection=Correct stock +StockTransfer=Stock transfer StockMovement=Transfer StockMovements=Stock transfers +LabelMovement=Movement label NumberOfUnit=Number of units UnitPurchaseValue=Unit purchase price TotalStock=Total in stock @@ -106,5 +108,5 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassStockMovement=Mass stock movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "Add". Once this is done for all required movements, click onto "Record Tranferts". +SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert \ No newline at end of file diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index 0630cab213e..b27213067a3 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -34,8 +34,10 @@ LastMovements=Derniers mouvements Units=Unités Unit=Unité StockCorrection=Corriger le stock +StockTransfer=Transfert de stock StockMovement=Transférer StockMovements=Mouvements de stock +LabelMovement=Libellé du mouvement NumberOfUnit=Nombre de pièces UnitPurchaseValue=Prix d'achat unitaire TotalStock=Total en stock @@ -106,5 +108,5 @@ Replenishments=Réapprovisionnement NbOfProductBeforePeriod=Quantité du produit %s en stock avant la période sélectionnée (< %s) NbOfProductAfterPeriod=Quantité du produit %s en stock après la période sélectionnée (> %s) MassStockMovement=Mouvement de stock en masse -SelectProductInAndOutWareHouse=Sélectionner un produit, une quantité à transférer, un entrepôt source et destination et cliquer sur ajouter. Une fois tous les mouvements enregistrés, cliquer sur "Enregistrer transferts". +SelectProductInAndOutWareHouse=Sélectionner un produit, une quantité à transférer, un entrepôt source et destination et cliquer sur "%s". Une fois tous les mouvements choisis, cliquer sur "%s". RecordMovement=Enregistrer transferts \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 32aa044b4e3..20a08f9b1bc 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -72,7 +72,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP6 * * @param string $val Value * @param string $type 1=GET, 0=POST, 2=PHP_SELF - * @return boolean true if there is an injection + * @return int >0 if there is an injection */ function test_sql_and_script_inject($val, $type) { @@ -102,7 +102,7 @@ function test_sql_and_script_inject($val, $type) } // For XSS Injection done by adding javascript closing html tags like with onmousemove, etc... (closing a src or href tag with not cleaned param) if ($type == 1) $sql_inj += preg_match('/"/i', $val); // We refused " in GET parameters value - if ($type == 2) $sql_inj += preg_match('/[\s;"]/', $val); // PHP_SELF is an url and must match url syntax + if ($type == 2) $sql_inj += preg_match('/[;"]/', $val); // PHP_SELF is a file system path. It can contains spaces. return $sql_inj; } @@ -111,7 +111,7 @@ function test_sql_and_script_inject($val, $type) * * @param string &$var Variable name * @param string $type 1=GET, 0=POST, 2=PHP_SELF - * @return boolean true if ther is an injection + * @return boolean true if there is an injection */ function analyse_sql_and_script(&$var, $type) { @@ -124,8 +124,8 @@ function analyse_sql_and_script(&$var, $type) $var[$key] = $value; } else - { - print 'Access refused by SQL/Script injection protection in main.inc.php'; + { + print 'Access refused by SQL/Script injection protection in main.inc.php (type='.htmlentities($type).' key='.htmlentities($key).' value='.htmlentities($value).' page='.htmlentities($_SERVER["REQUEST_URI"]).')'; exit; } } diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 234c4bb528e..1ad1807d459 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -103,17 +103,21 @@ if ($action == 'addline') if (! $error) { - $id=count($listofdata); + if (count(array_keys($listofdata)) > 0) $id=max(array_keys($listofdata)) + 1; + else $id=1; $listofdata[$id]=array('id'=>$id, 'id_product'=>$id_product, 'qty'=>$qty, 'id_sw'=>$id_sw, 'id_tw'=>$id_tw); $_SESSION['massstockmove']=dol_json_encode($listofdata); + + unset($id_product); + //unset($id_sw); + //unset($id_tw); + unset($qty); } } if ($action == 'delline' && $idline != '') { if (! empty($listofdata[$idline])) unset($listofdata[$idline]); - var_dump($listofdata); - var_dump(dol_json_encode($listofdata)); exit; if (count($listofdata) > 0) $_SESSION['massstockmove']=dol_json_encode($listofdata); else unset($_SESSION['massstockmove']); } @@ -132,6 +136,8 @@ if ($action == 'createmovement' && isset($_POST['valid'])) * View */ +$now=dol_now(); + $form=new Form($db); $formproduct=new FormProduct($db); $productstatic = new Product($db); @@ -144,8 +150,14 @@ llxHeader('', $title, $helpurl, ''); print_fiche_titre($langs->trans("MassStockMovement")).'

'; -print $langs->trans("SelectProductInAndOutWareHouse").'
'; +$titletoadd=$langs->trans("Select"); +$titletoaddnoent=$langs->transnoentitiesnoconv("Select"); +$buttonrecord=$langs->trans("RecordMovement"); +$buttonrecordnoent=$langs->trans("RecordMovement"); +print $langs->trans("SelectProductInAndOutWareHouse",$titletoaddnoent,$buttonrecordnoent).'
'; +print '
'."\n"; +$var=true; // Form to add a line print '
'; @@ -153,56 +165,41 @@ print ''; print ''; print ''; +//print '
'; print '
'; -print_liste_field_titre($langs->trans('Product'),$_SERVER["PHP_SELF"],'',$param,'','',$sortfield,$sortorder); -print_liste_field_titre($langs->trans('Qty'),$_SERVER["PHP_SELF"],'',$param,'','align="center"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans('WarehouseSource'),$_SERVER["PHP_SELF"],'',$param,'','align="center"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans('WarehouseTarget'),$_SERVER["PHP_SELF"],'',$param,'','align="center"',$sortfield,$sortorder); -print_liste_field_titre(''); +print getTitleFieldOfList($langs->trans('ProductRef'),0,$_SERVER["PHP_SELF"],'',$param,'','class="tagtd"',$sortfield,$sortorder); +print getTitleFieldOfList($langs->trans('ProductLabel'),0,$_SERVER["PHP_SELF"],'',$param,'','class="tagtd"',$sortfield,$sortorder); +print getTitleFieldOfList($langs->trans('WarehouseSource'),0,$_SERVER["PHP_SELF"],'',$param,'','class="tagtd"',$sortfield,$sortorder); +print getTitleFieldOfList($langs->trans('WarehouseTarget'),0,$_SERVER["PHP_SELF"],'',$param,'','class="tagtd"',$sortfield,$sortorder); +print getTitleFieldOfList($langs->trans('Qty'),0,$_SERVER["PHP_SELF"],'',$param,'','align="center" class="tagtd"',$sortfield,$sortorder); +print getTitleFieldOfList('',0); print ''; -print ''; + +print ''; // Product -print ''; -// Qty -print ''; // In warehouse -print ''; // Out warehouse -print ''; +// Qty +print ''; // Button to add line -print ''; +print ''; print ''; -print '
'; +print ''; $filtertype=0; if (! empty($conf->global->STOCK_SUPPORTS_SERVICES)) $filtertype=''; print $form->select_produits($id_product,'productid',$filtertype); print ''; +print ''; print $formproduct->selectWarehouses($id_sw,'id_sw','',1); print ''; +print ''; print $formproduct->selectWarehouses($id_tw,'id_tw','',1); print '
'; -print '
'; -print '
'; - -// List movement prepared -print ''; - -// Lignes des titres -print ''; -print_liste_field_titre($langs->trans('ProductRef'),$_SERVER["PHP_SELF"],'p.ref',$param,'','',$sortfield,$sortorder); -print_liste_field_titre($langs->trans('ProductLabel'),$_SERVER["PHP_SELF"],'p.label',$param,'','',$sortfield,$sortorder); -print_liste_field_titre($langs->trans('Qty'),$_SERVER["PHP_SELF"],'',$param,'','align="right"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans('WarehouseSource'),$_SERVER["PHP_SELF"],'',$param,'','align="right"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans('WarehouseTarget'),$_SERVER["PHP_SELF"],'',$param,'','align="right"',$sortfield,$sortorder); -print_liste_field_titre(''); -print ''; - -$var=false; foreach($listofdata as $key => $val) { $var=!$var; @@ -219,23 +216,35 @@ foreach($listofdata as $key => $val) print $productstatic->getNomUrl(1); $productstatic->ref=$oldref; print ''; - print ''; - print ''; - print ''; + print ''; print ''; print ''; } print '
'.$val['qty'].''; + print ''; print $warehousestatics->getNomUrl(1); print ''; + print ''; print $warehousestatict->getNomUrl(1); print ''.$val['qty'].''.img_delete($langs->trans("Remove")).'
'; - -// Generate -$value=$langs->trans("RecordMovement"); -print '
'; + +print '
'; + +// Button to record mass movement +$labelmovement=GETPOST("label")?GETPOST('label'):$langs->trans("MassStockMovement").' '.dol_print_date($now,'%Y-%m-%d %H:%M'); + +print ''; + print ''; + print ''; + print ''; + print ''; +print '
'.$langs->trans("LabelMovement").''; + print ''; + print '
'; + +print '
'; print ''; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index bca6660e10a..10ada810276 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -429,7 +429,7 @@ if ($id > 0 || $ref) */ if ($action == "transfert") { - print_titre($langs->trans("Transfer")); + print_titre($langs->trans("StockTransfer")); print '
'."\n"; print ''; print ''; @@ -442,21 +442,21 @@ if ($id > 0 || $ref) print ''.$langs->trans("WarehouseTarget").''; print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'),'id_entrepot_destination','',1); print ''; - print ''.$langs->trans("NumberOfUnit").''; + print ''.$langs->trans("NumberOfUnit").''; print ''; // Label print ''; - print ''.$langs->trans("Label").''; + print ''.$langs->trans("LabelMovement").''; print ''; - print ''; + print ''; print ''; print ''; print ''; - print '
 '; - print '
'; + print '
 '; + print '
'; print '
'; } diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index ca0ebf2d7fe..1fe899717d8 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -16,38 +16,41 @@ if (empty($conf->global->MAIN_FEATURES_LEVEL)) - + Login Dolibarr 3.4.0-alpha - - - - + + + + - - - + + + - +

This page is a sample of page using tables. To make test with
- css (edit page to change)
- jmobile (edit page to enable/disable)
-- dataTables.

+- dataTables.
+
+ +
-Example 1 : Table using tags: div+form
+Example 1 : Table using tags: div.tagtable+form+div or div.tagtable+div.tagtr+div.tagtd
snake
-
+
snagfdgfd gd fgf ke
@@ -55,12 +58,12 @@ Example 1 : Table using tags: div+form
-
+
snagfdgfd gd fgf ke
dfsdf
- +
@@ -69,7 +72,7 @@ Example 1 : Table using tags: div+form
-Example 2 : Table using tags: table/thead/tbdoy/tr/td + dataTable
+Example 2 : Table using tags: table/thead/tbody/tr/td + dataTable