Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2020-07-10 02:28:34 +02:00
commit 96c583b84e
11 changed files with 58 additions and 25 deletions

View File

@ -69,7 +69,7 @@ print '<td class="linecoldisablestockchange right">'.$form->textwithpicto($langs
print '<td class="linecolefficiency right">'.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).'</td>';
// Cost
print '<td class="linecolcost right">'.$langs->trans('CostPrice').'</td>';
print '<td class="linecolcost right">'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).'</td>';
print '<td class="linecoledit"></td>'; // No width to allow autodim

View File

@ -113,7 +113,7 @@ if ($this->status == 0 && ($object_rights->write) && $action != 'selectlines') {
$coldisplay++;
if (($line->info_bits & 2) == 2 || !empty($disableedit)) {
} else {
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=editline&amp;lineid='.$line->id.'#line_'.$line->id.'">'.img_edit().'</a>';
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=editline&amp;lineid='.$line->id.'">'.img_edit().'</a>';
}
print '</td>';

View File

@ -47,8 +47,8 @@ top_httphead();
print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
// Registering the location of boxes
if ((!empty($_POST['roworder'])) && (!empty($_POST['table_element_line']))
&& (!empty($_POST['fk_element'])) && (!empty($_POST['element_id'])))
if (GETPOST('roworder', 'alpha') && GETPOST('table_element_line', 'alpha', 2)
&& GETPOST('fk_element', 'alpha', 2) && GETPOST('element_id', 'int', 2))
{
$roworder = GETPOST('roworder', 'alpha', 2);
$table_element_line = GETPOST('table_element_line', 'alpha', 2);

View File

@ -7792,6 +7792,9 @@ abstract class CommonObject
$sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element;
$sql .= ' WHERE fk_'.$this->element.' = '.$this->id;
if ($morewhere) $sql .= $morewhere;
if (isset($objectline->fields['position'])) {
$sql .= $this->db->order('position', 'ASC');
}
$resql = $this->db->query($sql);
if ($resql)

View File

@ -1,8 +1,11 @@
# Dolibarr language file - Source file is en_US - languages
Language_am_ET=Ethiopian
Language_ar_AR=Arabic
Language_ar_EG=Arabic (Egypt)
Language_ar_SA=Arabic
Language_az_AZ=Azerbaijani
Language_bn_BD=Bengali
Language_bn_IN=Bengali (India)
Language_bg_BG=Bulgarian
Language_bs_BA=Bosnian
Language_ca_ES=Catalan
@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom)
Language_en_IN=English (India)
Language_en_NZ=English (New Zealand)
Language_en_SA=English (Saudi Arabia)
Language_en_SG=English (Singapore)
Language_en_US=English (United States)
Language_en_ZA=English (South Africa)
Language_es_ES=Spanish
@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile)
Language_es_CO=Spanish (Colombia)
Language_es_DO=Spanish (Dominican Republic)
Language_es_EC=Spanish (Ecuador)
Language_es_GT=Spanish (Guatemala)
Language_es_HN=Spanish (Honduras)
Language_es_MX=Spanish (Mexico)
Language_es_PA=Spanish (Panama)
@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay)
Language_es_PE=Spanish (Peru)
Language_es_PR=Spanish (Puerto Rico)
Language_es_UY=Spanish (Uruguay)
Language_es_GT=Spanish (USA)
Language_es_VE=Spanish (Venezuela)
Language_et_EE=Estonian
Language_eu_ES=Basque
@ -44,15 +50,21 @@ Language_fi_FI=Finnish
Language_fr_BE=French (Belgium)
Language_fr_CA=French (Canada)
Language_fr_CH=French (Switzerland)
Language_fr_CI=French (Cost Ivory)
Language_fr_CM=French (Cameroun)
Language_fr_FR=French
Language_fr_GA=French (Gabon)
Language_fr_NC=French (New Caledonia)
Language_fy_NL=Frisian
Language_gl_ES=Galician
Language_he_IL=Hebrew
Language_hi_IN=Hindi (India)
Language_hr_HR=Croatian
Language_hu_HU=Hungarian
Language_id_ID=Indonesian
Language_is_IS=Icelandic
Language_it_IT=Italian
Language_it_CH=Italian (Switzerland)
Language_ja_JP=Japanese
Language_ka_GE=Georgian
Language_km_KH=Khmer
@ -64,6 +76,7 @@ Language_lv_LV=Latvian
Language_mk_MK=Macedonian
Language_mn_MN=Mongolian
Language_nb_NO=Norwegian (Bokmål)
Language_ne_NP=Nepali
Language_nl_BE=Dutch (Belgium)
Language_nl_NL=Dutch
Language_pl_PL=Polish
@ -86,4 +99,5 @@ Language_uz_UZ=Uzbek
Language_vi_VN=Vietnamese
Language_zh_CN=Chinese
Language_zh_TW=Chinese (Traditional)
Language_zh_HK=Chinese (Hong Kong)
Language_bh_MY=Malay

View File

@ -101,8 +101,8 @@ DescWareHouse=Description warehouse
LieuWareHouse=Localisation warehouse
WarehousesAndProducts=Warehouses and products
WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial)
AverageUnitPricePMPShort=Weighted average input price
AverageUnitPricePMP=Weighted average input price
AverageUnitPricePMPShort=Weighted average price
AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock.
SellPriceMin=Selling Unit Price
EstimatedStockValueSellShort=Value for sell
EstimatedStockValueSell=Value for sell

View File

@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality
ReputationForThisProduct=Reputation
BuyerName=Buyer name
AllProductServicePrices=All product / service prices
AllProductReferencesOfSupplier=All product / service references of vendor
AllProductReferencesOfSupplier=All references of vendor
BuyingPriceNumShort=Vendor prices

View File

@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Mauvaise qualité
ReputationForThisProduct=Réputation
BuyerName=Nom de l'acheteur
AllProductServicePrices=Tous les prix du produits / service
AllProductReferencesOfSupplier=Toutes les références des produits/services du fournisseur
AllProductReferencesOfSupplier=Toutes les références du fournisseur
BuyingPriceNumShort=Prix fournisseurs

View File

@ -402,19 +402,7 @@ if ($id > 0 || $ref)
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// Minimum Price
print '<tr><td class="titlefield">'.$langs->trans("BuyingPriceMin").'</td>';
print '<td colspan="2">';
$product_fourn = new ProductFournisseur($db);
if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0)
{
if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur();
else print $langs->trans("NotDefined");
}
print '</td></tr>';
// Cost price. Can be used for margin module for option "calculate margin on explicit cost price
// Accountancy sell code
print '<tr><td>';
$textdesc = $langs->trans("CostPriceDescription");
$textdesc .= "<br>".$langs->trans("CostPriceUsage");
@ -424,7 +412,25 @@ if ($id > 0 || $ref)
print $form->editfieldval($text, 'cost_price', $object->cost_price, $object, $usercancreate, 'amount:6');
print '</td></tr>';
print '</table>';
// PMP
print '<tr><td class="titlefield">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>';
print '<td>';
if ($object->pmp > 0) print price($object->pmp).' '.$langs->trans("HT");
print '</td>';
print '</tr>';
// Best buying Price
print '<tr><td class="titlefield">'.$langs->trans("BuyingPriceMin").'</td>';
print '<td colspan="2">';
$product_fourn = new ProductFournisseur($db);
if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0)
{
if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur();
else print $langs->trans("NotDefined");
}
print '</td></tr>';
print '</table>';
print '</div>';
print '<div style="clear:both"></div>';

View File

@ -54,7 +54,7 @@ if (!empty($conf->variants->enabled)) {
}
// Load translation files required by the page
$langs->loadlangs(array('products', 'orders', 'bills', 'stocks', 'sendings'));
$langs->loadlangs(array('products', 'suppliers', 'orders', 'bills', 'stocks', 'sendings', 'margins'));
if (!empty($conf->productbatch->enabled)) $langs->load("productbatch");
$backtopage = GETPOST('backtopage', 'alpha');
@ -542,8 +542,18 @@ if ($id > 0 || $ref)
print '</td></tr>';
}
// Cost price. Can be used for margin module for option "calculate margin on explicit cost price
print '<tr><td>';
$textdesc = $langs->trans("CostPriceDescription");
$textdesc .= "<br>".$langs->trans("CostPriceUsage");
$text = $form->textwithpicto($langs->trans("CostPrice"), $textdesc, 1, 'help', '');
print $form->editfieldkey($text, 'cost_price', $object->cost_price, $object, $usercancreate, 'amount:6');
print '</td><td colspan="2">';
print $form->editfieldval($text, 'cost_price', $object->cost_price, $object, $usercancreate, 'amount:6');
print '</td></tr>';
// PMP
print '<tr><td class="titlefield">'.$langs->trans("AverageUnitPricePMP").'</td>';
print '<tr><td class="titlefield">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>';
print '<td>';
if ($object->pmp > 0) print price($object->pmp).' '.$langs->trans("HT");
print '</td>';
@ -790,7 +800,7 @@ if (!$variants) {
print '<tr class="liste_titre">';
print '<td colspan="4">'.$langs->trans("Warehouse").'</td>';
print '<td class="right">'.$langs->trans("NumberOfUnit").'</td>';
print '<td class="right">'.$langs->trans("AverageUnitPricePMPShort").'</td>';
print '<td class="right">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>';
print '<td class="right">'.$langs->trans("EstimatedStockValueShort").'</td>';
print '<td class="right">'.$langs->trans("SellPriceMin").'</td>';
print '<td class="right">'.$langs->trans("EstimatedStockValueSellShort").'</td>';

View File

@ -2077,7 +2077,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
<?php if (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->phone)) { ?>, phone: '<?php echo dol_escape_js($object->thirdparty->phone); ?>'<?php } ?>
<?php if (is_object($object) && is_object($object->thirdparty)) { ?>, address: {
city: '<?php echo dol_escape_js($object->thirdparty->town); ?>',
country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',
<?php if ($object->thirdparty->country_code) { ?>country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',<?php } ?>
line1: '<?php echo dol_escape_js(preg_replace('/\s\s+/', ' ', $object->thirdparty->address)); ?>',
postal_code: '<?php echo dol_escape_js($object->thirdparty->zip); ?>'}<?php } ?>
}