diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 622c494d095..48d7aa7240a 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1930,7 +1930,7 @@ if ($action == 'create') {
print $societe->getNomUrl(1);
print ' ';
} else {
- print img_picto('', 'company').$form->select_company($societe->id, 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
+ print img_picto('', 'company').$form->select_company($societe->id, 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 widthcentpercentminusxx');
// reload page to retrieve supplier informations
if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) {
print '';
- } else {
- print '
';
+ print '';
}
- } else {
- print ' ';
}
- print '';
}
$showbarcode = empty($conf->barcode->enabled) ? 0 : 1;
@@ -1163,9 +1170,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$formbarcode = new FormBarCode($db);
print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
print '';
- if ($conf->browser->layout == 'phone') {
- print '';
- }
+ print ' ';
print ''.$langs->trans("BarcodeValue").' ';
$tmpcode = GETPOSTISSET('barcode') ? GETPOST('barcode') : $object->barcode;
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) {
@@ -1176,7 +1181,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Description (used in invoice, propal...)
- print ' '.$langs->trans("Description").' ';
+ print ' '.$langs->trans("Description").' ';
$doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
$doleditor->Create();
@@ -1184,7 +1189,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print " ";
// Public URL
- print ''.$langs->trans("PublicUrl").' ';
+ print ' '.$langs->trans("PublicUrl").' ';
+ print img_picto('', 'globe', 'class="pictofixedwidth"');
print ' ';
print ' ';
@@ -1192,7 +1198,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Default warehouse
print ''.$langs->trans("DefaultWarehouse").' ';
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
- print $formproduct->selectWarehouses(GETPOST('fk_default_warehouse'), 'fk_default_warehouse', 'warehouseopen', 1);
+ print $formproduct->selectWarehouses(GETPOST('fk_default_warehouse', 'int'), 'fk_default_warehouse', 'warehouseopen', 1, 0, 0, '', 0, 0, array(), 'minwidth300 widthcentpercentminusxx maxwidth500');
print ' ';
print ' ';
print ' ';
@@ -1203,11 +1209,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print ' '.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).' ';
print ' ';
print ' ';
- if ($conf->browser->layout == 'phone') {
- print '';
- }
+
+ print ' ';
+
// Stock desired level
- print ''.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).' ';
+ print ' '.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).' ';
print ' ';
print ' ';
} else {
@@ -1217,7 +1223,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Duration
if ($type == 1) {
- print ''.$langs->trans("Duration").' ';
+ print ' '.$langs->trans("Duration").' ';
print ' ';
print $formproduct->selectMeasuringUnits("duration_unit", "time", GETPOST('duration_value', 'alpha'), 0, 1);
print ' ';
@@ -1225,20 +1231,20 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if ($type != 1) { // Nature, Weight and volume only applies to products and not to services
// Nature
- print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).' ';
+ print ' '.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).' ';
$statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
print $form->selectarray('finished', $statutarray, GETPOST('finished', 'alpha'), 1);
print ' ';
// Brut Weight
- print ''.$langs->trans("Weight").' ';
+ print ' '.$langs->trans("Weight").' ';
print ' ';
print $formproduct->selectMeasuringUnits("weight_units", "weight", GETPOSTISSET('weight_units') ?GETPOST('weight_units', 'alpha') : (empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? 0 : $conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 2);
print ' ';
// Brut Length
if (empty($conf->global->PRODUCT_DISABLE_SIZE)) {
- print ''.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").' ';
+ print ' '.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").' ';
print ' x ';
print ' x ';
print ' ';
@@ -1247,14 +1253,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) {
// Brut Surface
- print ' '.$langs->trans("Surface").' ';
+ print ' '.$langs->trans("Surface").' ';
print ' ';
print $formproduct->selectMeasuringUnits("surface_units", "surface", GETPOSTISSET('surface_units') ?GETPOST('surface_units', 'alpha') : '0', 0, 2);
print ' ';
}
if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) {
// Brut Volume
- print ''.$langs->trans("Volume").' ';
+ print ' '.$langs->trans("Volume").' ';
print ' ';
print $formproduct->selectMeasuringUnits("volume_units", "volume", GETPOSTISSET('volume_units') ?GETPOST('volume_units', 'alpha') : '0', 0, 2);
print ' ';
@@ -1262,7 +1268,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) {
// Net Measure
- print ''.$langs->trans("NetMeasure").' ';
+ print ' '.$langs->trans("NetMeasure").' ';
print ' ';
print $formproduct->selectMeasuringUnits("net_measure_units", '', GETPOSTISSET('net_measure_units') ?GETPOST('net_measure_units', 'alpha') : (empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? 0 : $conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 0);
print ' ';
@@ -1272,41 +1278,37 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Units
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
print ''.$langs->trans('DefaultUnitToShow').' ';
- print '';
+ print ' ';
print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, 'units');
print ' ';
}
// Custom code
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) {
- print ''.$langs->trans("CustomCode").' ';
+ print ''.$langs->trans("CustomCode").' ';
// Origin country
- print ''.$langs->trans("CountryOrigin").' ';
+ print ''.$langs->trans("CountryOrigin").' ';
print '';
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx');
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
- print ' ';
+ print ' ';
// State
if (empty($conf->global->PRODUCT_DISABLE_STATE)) {
- if ($conf->browser->layout == 'phone') {
- print '';
- }
+ print ' ';
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) {
- print ''.$form->editfieldkey('RegionStateOrigin', 'state_id', '', $object, 0).' ';
+ print ' '.$form->editfieldkey('RegionStateOrigin', 'state_id', '', $object, 0).' ';
} else {
- print ' '.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).' ';
+ print ' '.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).' ';
}
print $formcompany->select_state($object->state_id, $object->country_code);
print ' ';
}
-
- print '';
}
// Quality control
@@ -1316,7 +1318,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Other attributes
- $parameters = array('colspan' => 3, 'cols' => '3');
+ $parameters = array('colspan' => ' colspan="2"', 'cols'=>2);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
@@ -1326,7 +1328,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Note (private, no output on invoices, propales...)
//if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) available in create mode
//{
- print ''.$langs->trans("NoteNotVisibleOnBill").' ';
+ print ' '.$langs->trans("NoteNotVisibleOnBill").' ';
// We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF.
$doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_8, '90%');
@@ -1337,7 +1339,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if ($conf->categorie->enabled) {
// Categories
- print ' '.$langs->trans("Categories").' ';
+ print ' '.$langs->trans("Categories").' ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
print " ";
@@ -1385,6 +1387,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Accountancy codes
+ print ''."\n";
print '';
if (!empty($conf->accounting->enabled)) {
@@ -1396,7 +1399,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT);
}
- print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
+ print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
print '';
// Accountancy_code_sell_intra
@@ -1408,7 +1411,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT);
}
- print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
+ print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
print '';
}
@@ -1420,7 +1423,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT);
}
- print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
+ print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
print '';
// Accountancy_code_buy
@@ -1431,7 +1434,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT);
}
- print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
+ print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
print '';
// Accountancy_code_buy_intra
@@ -1443,7 +1446,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT);
}
- print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
+ print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
print '';
}
@@ -1455,10 +1458,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT);
}
- print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
+ print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
print '';
- } else // For external software
- {
+ } else {// For external software
if (!empty($accountancy_code_sell)) {
$object->accountancy_code_sell = $accountancy_code_sell;
}
@@ -1480,36 +1482,36 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Accountancy_code_sell
print ''.$langs->trans("ProductAccountancySellCode").' ';
- print ' ';
+ print ' ';
print ' ';
// Accountancy_code_sell_intra
if ($mysoc->isInEEC()) {
print ''.$langs->trans("ProductAccountancySellIntraCode").' ';
- print ' ';
+ print ' ';
print ' ';
}
// Accountancy_code_sell_export
print ''.$langs->trans("ProductAccountancySellExportCode").' ';
- print ' ';
+ print ' ';
print ' ';
// Accountancy_code_buy
print ''.$langs->trans("ProductAccountancyBuyCode").' ';
- print ' ';
+ print ' ';
print ' ';
// Accountancy_code_buy_intra
if ($mysoc->isInEEC()) {
print ''.$langs->trans("ProductAccountancyBuyIntraCode").' ';
- print ' ';
+ print ' ';
print ' ';
}
// Accountancy_code_buy_export
print ''.$langs->trans("ProductAccountancyBuyExportCode").' ';
- print ' ';
+ print ' ';
print ' ';
}
print '
';
@@ -1609,14 +1611,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print ''.$langs->trans("ManageLotSerial").' ';
$statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial"));
print $form->selectarray('status_batch', $statutarray, $object->status_batch);
- print ' ';
+ print ' ';
if ($object->status_batch !== '0') {
$tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Batch"), $langs->transnoentities("Batch"));
$tooltip .= $langs->trans("GenericMaskCodes2");
$tooltip .= $langs->trans("GenericMaskCodes3");
$tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch"));
$tooltip .= $langs->trans("GenericMaskCodes5");
- print ''.$langs->trans("ManageLotMask").' ';
+ print ''.$langs->trans("ManageLotMask").' ';
if ($object->status_batch == '1' && $conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') {
$mask = ! empty($object->batch_mask) ? $object->batch_mask : $conf->global->LOT_ADVANCED_MASK;
}
@@ -1627,7 +1629,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$inherited_mask_sn = $conf->global->SN_ADVANCED_MASK;
print '';
print $form->textwithpicto(' ', $tooltip, 1, 1);
- print ' ';
print '';
- } else {
- print ' ';
+ print ' ';
}
- print '';
}
}
@@ -1677,17 +1687,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
$formbarcode = new FormBarCode($db);
print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
- print ''.$langs->trans("BarcodeValue").' ';
+ print ' ';
+ print ''.$langs->trans("BarcodeValue").' ';
$tmpcode = GETPOSTISSET('barcode') ? GETPOST('barcode') : $object->barcode;
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) {
$tmpcode = $modBarCodeProduct->getNextValue($object, $fk_barcode_type);
}
- print ' ';
+ print ' ';
print ' ';
}
// Description (used in invoice, propal...)
- print ''.$langs->trans("Description").' ';
+ print ' '.$langs->trans("Description").' ';
// We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF.
$doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
@@ -1697,7 +1708,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print "\n";
// Public Url
- print ' '.$langs->trans("PublicUrl").' ';
+ print ' '.$langs->trans("PublicUrl").' ';
print ' ';
print ' ';
@@ -1707,7 +1718,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print ''.$langs->trans("DefaultWarehouse").' ';
print $formproduct->selectWarehouses($object->fk_default_warehouse, 'fk_default_warehouse', 'warehouseopen', 1);
print ' ';
- print ' ';
+ print ' ';
/*
print "".''.$langs->trans("StockLimit").' ';
print ' ';
@@ -1727,25 +1738,25 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if ($object->isService()) {
// Duration
- print ' '.$langs->trans("Duration").' ';
+ print ' '.$langs->trans("Duration").' ';
print ' ';
print $formproduct->selectMeasuringUnits("duration_unit", "time", $object->duration_unit, 0, 1);
print ' ';
} else {
// Nature
- print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).' ';
+ print ' '.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).' ';
print $formproduct->selectProductNature('finished', $object->finished);
print ' ';
// Brut Weight
- print ''.$langs->trans("Weight").' ';
+ print ' '.$langs->trans("Weight").' ';
print ' ';
print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2);
print ' ';
if (empty($conf->global->PRODUCT_DISABLE_SIZE)) {
// Brut Length
- print ''.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").' ';
+ print ' '.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").' ';
print ' x';
print ' x';
print ' ';
@@ -1754,14 +1765,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) {
// Brut Surface
- print ' '.$langs->trans("Surface").' ';
+ print ' '.$langs->trans("Surface").' ';
print ' ';
print $formproduct->selectMeasuringUnits("surface_units", "surface", $object->surface_units, 0, 2);
print ' ';
}
if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) {
// Brut Volume
- print ''.$langs->trans("Volume").' ';
+ print ' '.$langs->trans("Volume").' ';
print ' ';
print $formproduct->selectMeasuringUnits("volume_units", "volume", $object->volume_units, 0, 2);
print ' ';
@@ -1769,7 +1780,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) {
// Net Measure
- print ''.$langs->trans("NetMeasure").' ';
+ print ' '.$langs->trans("NetMeasure").' ';
print ' ';
print $formproduct->selectMeasuringUnits("net_measure_units", "", $object->net_measure_units, 0, 0);
print ' ';
@@ -1778,38 +1789,36 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Units
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
print ''.$langs->trans('DefaultUnitToShow').' ';
- print '';
+ print ' ';
print $form->selectUnits($object->fk_unit, 'units');
print ' ';
}
// Custom code
if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) {
- print ''.$langs->trans("CustomCode").' ';
+ print ''.$langs->trans("CustomCode").' ';
// Origin country
- print ''.$langs->trans("CountryOrigin").' ';
+ print ''.$langs->trans("CountryOrigin").' ';
print '';
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
print $form->select_country($object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone');
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
- print ' ';
+ print ' ';
// State
if (empty($conf->global->PRODUCT_DISABLE_STATE)) {
- if ($conf->browser->layout == 'phone') {
- print '';
- }
+ print ' ';
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) {
- print ''.$form->editfieldkey('RegionStateOrigin', 'state_id', '', $object, 0).' ';
+ print ' '.$form->editfieldkey('RegionStateOrigin', 'state_id', '', $object, 0).' ';
} else {
- print ' '.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).' ';
+ print ' '.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).' ';
}
print $formcompany->select_state($object->state_id, $object->country_code);
print ' ';
+ print ' ';
}
- print '';
}
// Quality control
@@ -1819,7 +1828,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Other attributes
- $parameters = array('colspan' => ' colspan="3"', 'cols' => 3);
+ $parameters = array('colspan' => ' colspan="2"', 'cols' => 2);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
@@ -1828,7 +1837,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Tags-Categories
if ($conf->categorie->enabled) {
- print ''.$langs->trans("Categories").' ';
+ print ' '.$langs->trans("Categories").' ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
$c = new Categorie($db);
$cats = $c->containing($object->id, Categorie::TYPE_PRODUCT);
@@ -1844,7 +1853,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Note private
if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) {
- print ' '.$langs->trans("NoteNotVisibleOnBill").' ';
+ print ' '.$langs->trans("NoteNotVisibleOnBill").' ';
$doleditor = new DolEditor('note_private', $object->note_private, '', 140, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
$doleditor->Create();
@@ -1862,41 +1871,41 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Accountancy_code_sell
print ' '.$langs->trans("ProductAccountancySellCode").' ';
print '';
- print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1);
+ print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1, 'minwidth150 maxwidth300');
print ' ';
// Accountancy_code_sell_intra
if ($mysoc->isInEEC()) {
print ''.$langs->trans("ProductAccountancySellIntraCode").' ';
print '';
- print $formaccounting->select_account($object->accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, '', 1, 1);
+ print $formaccounting->select_account($object->accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, '', 1, 1, 'minwidth150 maxwidth300');
print ' ';
}
// Accountancy_code_sell_export
print ''.$langs->trans("ProductAccountancySellExportCode").' ';
print '';
- print $formaccounting->select_account($object->accountancy_code_sell_export, 'accountancy_code_sell_export', 1, '', 1, 1);
+ print $formaccounting->select_account($object->accountancy_code_sell_export, 'accountancy_code_sell_export', 1, '', 1, 1, 'minwidth150 maxwidth300');
print ' ';
// Accountancy_code_buy
print ''.$langs->trans("ProductAccountancyBuyCode").' ';
print '';
- print $formaccounting->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 1, 1);
+ print $formaccounting->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 1, 1, 'minwidth150 maxwidth300');
print ' ';
// Accountancy_code_buy_intra
if ($mysoc->isInEEC()) {
print ''.$langs->trans("ProductAccountancyBuyIntraCode").' ';
print '';
- print $formaccounting->select_account($object->accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, '', 1, 1);
+ print $formaccounting->select_account($object->accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, '', 1, 1, 'minwidth150 maxwidth300');
print ' ';
}
// Accountancy_code_buy_export
print ''.$langs->trans("ProductAccountancyBuyExportCode").' ';
print '';
- print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1);
+ print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1, 'minwidth150 maxwidth300');
print ' ';
} else {
// For external software
diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php
index 69429677c27..637e186a3f3 100644
--- a/htdocs/product/class/html.formproduct.class.php
+++ b/htdocs/product/class/html.formproduct.class.php
@@ -382,11 +382,13 @@ class FormProduct
* @param string $default Preselected value
* @param int|string $adddefault 1=Add empty unit called "Default", ''=Add empty value
* @param int $mode 1=Use short label as value, 0=Use rowid, 2=Use scale (power)
+ * @param string $morecss More CSS
* @return string
*/
- public function selectMeasuringUnits($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0, $mode = 0)
+ public function selectMeasuringUnits($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0, $mode = 0, $morecss = 'maxwidth125')
{
global $langs, $conf, $mysoc, $db;
+
$langs->load("other");
$return = '';
@@ -412,7 +414,7 @@ class FormProduct
dol_print_error($db);
return -1;
} else {
- $return .= '';
+ $return .= '';
if ($adddefault || $adddefault === '') {
$return .= ''.($adddefault ? $langs->trans("Default") : '').' ';
}