Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
e9da44e023
@ -114,6 +114,7 @@ NEW: Option in workflow module to set a reception billed on validate supplier bi
|
|||||||
NEW: Autocompletion on lists should be available on mobile applications.
|
NEW: Autocompletion on lists should be available on mobile applications.
|
||||||
NEW: Add mass action to close several members.
|
NEW: Add mass action to close several members.
|
||||||
NEW: Add hidden option ADD_UNSPLASH_LOGIN_BACKGROUND for random background
|
NEW: Add hidden option ADD_UNSPLASH_LOGIN_BACKGROUND for random background
|
||||||
|
NEW: Add hidden option to be ready for BREXIT
|
||||||
|
|
||||||
For Developers:
|
For Developers:
|
||||||
NEW: Module "DebugBar" is available as a stable module.
|
NEW: Module "DebugBar" is available as a stable module.
|
||||||
|
|||||||
@ -92,9 +92,6 @@ if (! $user->rights->accounting->bind->write)
|
|||||||
$hookmanager->initHooks(array('accountancycustomerlist'));
|
$hookmanager->initHooks(array('accountancycustomerlist'));
|
||||||
|
|
||||||
$formaccounting = new FormAccounting($db);
|
$formaccounting = new FormAccounting($db);
|
||||||
$accounting = new AccountingAccount($db);
|
|
||||||
$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1);
|
|
||||||
$aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT, 1);
|
|
||||||
|
|
||||||
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
|
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
|
||||||
|
|
||||||
@ -384,11 +381,11 @@ if ($result) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||||
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
|
||||||
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50 right" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
|
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50 right" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
|
||||||
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50 right" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
|
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50 right" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1);
|
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth150', 'code2', 1, 0, 1);
|
||||||
//print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
|
//print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
||||||
@ -444,29 +441,50 @@ if ($result) {
|
|||||||
|
|
||||||
$isBuyerInEEC = isInEEC($objp);
|
$isBuyerInEEC = isInEEC($objp);
|
||||||
|
|
||||||
|
$suggestedaccountingaccountbydefaultfor = '';
|
||||||
if ($objp->type_l == 1) {
|
if ($objp->type_l == 1) {
|
||||||
|
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
||||||
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
||||||
if ($objp->aarowid == '') {
|
$suggestedaccountingaccountbydefaultfor = '';
|
||||||
$objp->aarowid_suggest = $aarowid_s;
|
} else {
|
||||||
|
if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
||||||
|
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'eec';
|
||||||
|
} else { // Foreign sale
|
||||||
|
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'export';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} elseif ($objp->type_l == 0) {
|
} elseif ($objp->type_l == 0) {
|
||||||
|
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
||||||
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
|
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
|
||||||
if ($objp->aarowid == '') {
|
$suggestedaccountingaccountbydefaultfor = '';
|
||||||
$objp->aarowid_suggest = $aarowid_p;
|
} else {
|
||||||
|
if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
||||||
|
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'eec';
|
||||||
|
} else {
|
||||||
|
$objp->code_sell_l = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'export';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($objp->code_sell_l == -1) $objp->code_sell_l='';
|
if ($objp->code_sell_l == -1) $objp->code_sell_l='';
|
||||||
|
|
||||||
|
$suggestedaccountingaccountfor = '';
|
||||||
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
||||||
$objp->code_sell_p = $objp->code_sell;
|
$objp->code_sell_p = $objp->code_sell;
|
||||||
$objp->aarowid_suggest = $objp->aarowid;
|
$objp->aarowid_suggest = $objp->aarowid;
|
||||||
|
$suggestedaccountingaccountfor = '';
|
||||||
} else {
|
} else {
|
||||||
if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
||||||
$objp->code_sell_p = $objp->code_sell_intra;
|
$objp->code_sell_p = $objp->code_sell_intra;
|
||||||
$objp->aarowid_suggest = $objp->aarowid_intra;
|
$objp->aarowid_suggest = $objp->aarowid_intra;
|
||||||
|
$suggestedaccountingaccountfor = 'eec';
|
||||||
} else { // Foreign sale
|
} else { // Foreign sale
|
||||||
$objp->code_sell_p = $objp->code_sell_export;
|
$objp->code_sell_p = $objp->code_sell_export;
|
||||||
$objp->aarowid_suggest = $objp->aarowid_export;
|
$objp->aarowid_suggest = $objp->aarowid_export;
|
||||||
|
$suggestedaccountingaccountfor = 'export';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -477,8 +495,8 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
if (empty($objp->code_sell_l) && empty($objp->code_sell_p)) $code_sell_p_notset = 'color:red';
|
if (empty($objp->code_sell_l) && empty($objp->code_sell_p)) $code_sell_p_notset = 'color:red';
|
||||||
|
|
||||||
// $objp->code_sell_p is now code of product/service
|
|
||||||
// $objp->code_sell_l is now default code of product/service
|
// $objp->code_sell_l is now default code of product/service
|
||||||
|
// $objp->code_sell_p is now code of product/service
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
@ -492,7 +510,7 @@ if ($result) {
|
|||||||
|
|
||||||
// Ref Product
|
// Ref Product
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($product_static->id)
|
if ($product_static->id > 0)
|
||||||
print $product_static->getNomUrl(1);
|
print $product_static->getNomUrl(1);
|
||||||
if ($objp->product_label) print '<br>'.$objp->product_label;
|
if ($objp->product_label) print '<br>'.$objp->product_label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -514,7 +532,7 @@ if ($result) {
|
|||||||
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
|
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="center">';
|
print '<td>';
|
||||||
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
|
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
|
||||||
print $labelcountry;
|
print $labelcountry;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -523,17 +541,27 @@ if ($result) {
|
|||||||
|
|
||||||
// Current account
|
// Current account
|
||||||
print '<td class="center" style="' . $code_sell_p_notset . '">';
|
print '<td class="center" style="' . $code_sell_p_notset . '">';
|
||||||
print (($objp->type_l == 1)?$langs->trans("DefaultForService"):$langs->trans("DefaultForProduct")) . ' = ' . ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : $langs->trans("Unknown"));
|
$s = (($objp->type_l == 1)?$langs->trans("DefaultForService"):$langs->trans("DefaultForProduct")).': ';
|
||||||
|
$shelp = '';
|
||||||
|
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp.= $langs->trans("SaleEEC");
|
||||||
|
elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp.= $langs->trans("SaleExport");
|
||||||
|
$s.= ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : $langs->trans("NotDefined"));
|
||||||
|
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||||
if ($objp->product_id > 0)
|
if ($objp->product_id > 0)
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print (($objp->type_l == 1)?$langs->trans("ThisService"):$langs->trans("ThisProduct")) . ' = ' . (empty($objp->code_sell_p) ? $langs->trans("Unknown") : length_accountg($objp->code_sell_p));
|
$s = (($objp->type_l == 1)?$langs->trans("ThisService"):$langs->trans("ThisProduct")).': ';
|
||||||
|
$shelp = '';
|
||||||
|
if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC");
|
||||||
|
elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport");
|
||||||
|
$s.= (empty($objp->code_sell_p) ? $langs->trans("NotDefined") : length_accountg($objp->code_sell_p));
|
||||||
|
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Suggested accounting account
|
// Suggested accounting account
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
|
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Column with checkbox
|
// Column with checkbox
|
||||||
|
|||||||
@ -332,8 +332,8 @@ if ($result) {
|
|||||||
if ($search_desc) $param.='&search_desc='.urlencode($search_desc);
|
if ($search_desc) $param.='&search_desc='.urlencode($search_desc);
|
||||||
if ($search_amount) $param.='&search_amount='.urlencode($search_amount);
|
if ($search_amount) $param.='&search_amount='.urlencode($search_amount);
|
||||||
if ($search_vat) $param.='&search_vat='.urlencode($search_vat);
|
if ($search_vat) $param.='&search_vat='.urlencode($search_vat);
|
||||||
if ($search_country) $param .= "&search_country=" . urlencode($search_country);
|
if ($search_country) $param.="&search_country=".urlencode($search_country);
|
||||||
if ($search_tvaintra) $param .= "&search_tvaintra=" . urlencode($search_tvaintra);
|
if ($search_tvaintra) $param.="&search_tvaintra=".urlencode($search_tvaintra);
|
||||||
|
|
||||||
$arrayofmassactions = array(
|
$arrayofmassactions = array(
|
||||||
'ventil'=>$langs->trans("Ventilate")
|
'ventil'=>$langs->trans("Ventilate")
|
||||||
@ -382,11 +382,11 @@ if ($result) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||||
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
|
||||||
print '<td class="liste_titre right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
|
print '<td class="liste_titre right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
|
||||||
print '<td class="liste_titre right"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
|
print '<td class="liste_titre right"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1);
|
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth150', 'code2', 1, 0, 1);
|
||||||
//print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
|
//print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
||||||
@ -418,7 +418,7 @@ if ($result) {
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$facturefourn_static = new FactureFournisseur($db);
|
$facturefourn_static = new FactureFournisseur($db);
|
||||||
$productfourn_static = new ProductFournisseur($db);
|
$product_static = new Product($db);
|
||||||
|
|
||||||
while ($i < min($num_lines, $limit)) {
|
while ($i < min($num_lines, $limit)) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
@ -430,10 +430,10 @@ if ($result) {
|
|||||||
$objp->code_buy_p = '';
|
$objp->code_buy_p = '';
|
||||||
$objp->aarowid_suggest = '';
|
$objp->aarowid_suggest = '';
|
||||||
|
|
||||||
$productfourn_static->ref = $objp->product_ref;
|
$product_static->ref = $objp->product_ref;
|
||||||
$productfourn_static->id = $objp->product_id;
|
$product_static->id = $objp->product_id;
|
||||||
$productfourn_static->type = $objp->type;
|
$product_static->type = $objp->type;
|
||||||
$productfourn_static->label = $objp->product_label;
|
$product_static->label = $objp->product_label;
|
||||||
|
|
||||||
$facturefourn_static->ref = $objp->ref;
|
$facturefourn_static->ref = $objp->ref;
|
||||||
$facturefourn_static->id = $objp->facid;
|
$facturefourn_static->id = $objp->facid;
|
||||||
@ -479,8 +479,8 @@ if ($result) {
|
|||||||
|
|
||||||
// Ref product
|
// Ref product
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($productfourn_static->id)
|
if ($product_static->id > 0)
|
||||||
print $productfourn_static->getNomUrl(1);
|
print $product_static->getNomUrl(1);
|
||||||
if ($objp->product_label) print '<br>'.$objp->product_label;
|
if ($objp->product_label) print '<br>'.$objp->product_label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -502,26 +502,38 @@ if ($result) {
|
|||||||
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
|
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="center">';
|
// Country
|
||||||
|
print '<td>';
|
||||||
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
|
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
|
||||||
print $labelcountry;
|
print $labelcountry;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// VAT Num
|
||||||
print '<td>' . $objp->tva_intra . '</td>';
|
print '<td>' . $objp->tva_intra . '</td>';
|
||||||
|
|
||||||
// Current account
|
// Current account
|
||||||
print '<td class="center" style="' . $code_buy_p_notset . '">';
|
print '<td class="center" style="' . $code_buy_p_notset . '">';
|
||||||
print (($objp->type_l == 1)?$langs->trans("DefaultForService"):$langs->trans("DefaultForProduct")) . ' = ' . ($objp->code_buy_l > 0 ? length_accountg($objp->code_buy_l) : $langs->trans("Unknown"));
|
$s = (($objp->type_l == 1)?$langs->trans("DefaultForService"):$langs->trans("DefaultForProduct")).': ';
|
||||||
|
$shelp = '';
|
||||||
|
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp.= $langs->trans("SaleEEC");
|
||||||
|
elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp.= $langs->trans("SaleExport");
|
||||||
|
$s.= ($objp->code_buy_l > 0 ? length_accountg($objp->code_buy_l) : $langs->trans("NotDefined"));
|
||||||
|
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||||
if ($objp->product_id > 0)
|
if ($objp->product_id > 0)
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print (($objp->type_l == 1)?$langs->trans("ThisService"):$langs->trans("ThisProduct")) . ' = ' . (empty($objp->code_buy_p) ? $langs->trans("Unknown") : length_accountg($objp->code_buy_p));
|
$s = (($objp->type_l == 1)?$langs->trans("ThisService"):$langs->trans("ThisProduct")).': ';
|
||||||
|
$shelp = '';
|
||||||
|
if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC");
|
||||||
|
elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport");
|
||||||
|
$s.= (empty($objp->code_buy_p) ? $langs->trans("NotDefined") : length_accountg($objp->code_buy_p));
|
||||||
|
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Suggested accounting account
|
// Suggested accounting account
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
|
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Column with checkbox
|
// Column with checkbox
|
||||||
|
|||||||
@ -649,6 +649,8 @@ function getFormeJuridiqueLabel($code)
|
|||||||
*/
|
*/
|
||||||
function getCountriesInEEC()
|
function getCountriesInEEC()
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
// List of all country codes that are in europe for european vat rules
|
// List of all country codes that are in europe for european vat rules
|
||||||
// List found on http://ec.europa.eu/taxation_customs/common/faq/faq_1179_en.htm#9
|
// List found on http://ec.europa.eu/taxation_customs/common/faq/faq_1179_en.htm#9
|
||||||
$country_code_in_EEC=array(
|
$country_code_in_EEC=array(
|
||||||
@ -687,6 +689,12 @@ function getCountriesInEEC()
|
|||||||
//'CH', // Switzerland - No. Swizerland in not in EEC
|
//'CH', // Switzerland - No. Swizerland in not in EEC
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (! empty($conf->global->MAIN_COUNTRIES_IN_EEC))
|
||||||
|
{
|
||||||
|
// For example MAIN_COUNTRIES_IN_EEC = 'AT,BE,BG,CY,CZ,DE,DK,EE,ES,FI,FR,GB,GR,HR,NL,HU,IE,IM,IT,LT,LU,LV,MC,MT,PL,PT,RO,SE,SK,SI,UK'
|
||||||
|
$country_code_in_EEC = explode(',', $conf->global->MAIN_COUNTRIES_IN_EEC);
|
||||||
|
}
|
||||||
|
|
||||||
return $country_code_in_EEC;
|
return $country_code_in_EEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1009,7 +1009,8 @@ class ProductFournisseur extends Product
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a link to the object card (with optionaly the picto)
|
* Return a link to the object card (with optionaly the picto).
|
||||||
|
* Used getNomUrl of ProductFournisseur if a specific supplier ref is loaded. Otherwise use Product->getNomUrl().
|
||||||
*
|
*
|
||||||
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
||||||
* @param string $option On what the link point to ('nolink', ...)
|
* @param string $option On what the link point to ('nolink', ...)
|
||||||
@ -1025,11 +1026,10 @@ class ProductFournisseur extends Product
|
|||||||
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||||
|
|
||||||
$result = '';
|
$result = '';
|
||||||
$companylink = '';
|
|
||||||
|
|
||||||
$label = '<u>' . $langs->trans("SupplierRef") . '</u>';
|
$label = '<u>' . $langs->trans("SupplierRef") . '</u>';
|
||||||
$label.= '<br>';
|
$label.= '<br>';
|
||||||
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->fourn_ref;
|
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref_supplier;
|
||||||
|
|
||||||
$logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id, 'pfpl.datec', 'DESC'); // set sort order here
|
$logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id, 'pfpl.datec', 'DESC'); // set sort order here
|
||||||
if (is_array($logPrices) && count($logPrices) > 0) {
|
if (is_array($logPrices) && count($logPrices) > 0) {
|
||||||
|
|||||||
@ -316,6 +316,9 @@ WithoutValidAccount=Without valid dedicated account
|
|||||||
WithValidAccount=With valid dedicated account
|
WithValidAccount=With valid dedicated account
|
||||||
ValueNotIntoChartOfAccount=This value of accounting account does not exist into chart of account
|
ValueNotIntoChartOfAccount=This value of accounting account does not exist into chart of account
|
||||||
AccountRemovedFromGroup=Account removed from group
|
AccountRemovedFromGroup=Account removed from group
|
||||||
|
SaleLocal=Local sale
|
||||||
|
SaleExport=Export sale
|
||||||
|
SaleEEC=Sale in EEC
|
||||||
|
|
||||||
## Dictionary
|
## Dictionary
|
||||||
Range=Range of accounting account
|
Range=Range of accounting account
|
||||||
|
|||||||
@ -4059,16 +4059,18 @@ class Product extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'"';
|
$linkstart = '<a class="nowraponall" href="'.$url.'"';
|
||||||
$linkstart.=$linkclose.'>';
|
$linkstart.=$linkclose.'>';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
$result.=$linkstart;
|
$result.=$linkstart;
|
||||||
if ($withpicto)
|
if ($withpicto)
|
||||||
{
|
{
|
||||||
if ($this->type == Product::TYPE_PRODUCT) { $result.=(img_object(($notooltip?'':$label), 'product', ($notooltip?'class="paddingright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
if ($this->type == Product::TYPE_PRODUCT) {
|
||||||
|
$result.=(img_object(($notooltip?'':$label), 'product', ($notooltip?'class="paddingright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
||||||
}
|
}
|
||||||
if ($this->type == Product::TYPE_SERVICE) { $result.=(img_object(($notooltip?'':$label), 'service', ($notooltip?'class="paddinright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
if ($this->type == Product::TYPE_SERVICE) {
|
||||||
|
$result.=(img_object(($notooltip?'':$label), 'service', ($notooltip?'class="paddinright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result.= $newref;
|
$result.= $newref;
|
||||||
@ -4078,8 +4080,10 @@ class Product extends CommonObject
|
|||||||
$hookmanager->initHooks(array('productdao'));
|
$hookmanager->initHooks(array('productdao'));
|
||||||
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
|
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
|
||||||
$reshook=$hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook > 0) { $result = $hookmanager->resPrint;
|
if ($reshook > 0) {
|
||||||
} else { $result .= $hookmanager->resPrint;
|
$result = $hookmanager->resPrint;
|
||||||
|
} else {
|
||||||
|
$result .= $hookmanager->resPrint;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user