Merge branch 'develop' into sonikf-patch-salary-clone
This commit is contained in:
commit
87fbe22fad
22 changed files with 374 additions and 154 deletions
|
|
@ -10749,7 +10749,7 @@ parameters:
|
|||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
count: 1
|
||||
count: 2
|
||||
path: ../../../htdocs/core/lib/company.lib.php
|
||||
|
||||
-
|
||||
|
|
|
|||
|
|
@ -382,6 +382,7 @@ if ($action == 'edit') {
|
|||
clearstatcache();
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td></td></tr>';
|
||||
|
||||
|
|
@ -613,11 +614,11 @@ if ($action == 'edit') {
|
|||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("OtherOptions").'</td><td></td></tr>';
|
||||
|
||||
|
|
@ -664,6 +665,7 @@ if ($action == 'edit') {
|
|||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
|
@ -868,7 +870,7 @@ if ($action == 'edit') {
|
|||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_FORCE_SENDTO").'</td><td>'.getDolGlobalString('MAIN_MAIL_FORCE_SENDTO');
|
||||
if (getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')) {
|
||||
if (!isValidEmail(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) {
|
||||
print img_warning($langs->trans("ErrorBadEMail"));
|
||||
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')));
|
||||
} else {
|
||||
print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue"));
|
||||
}
|
||||
|
|
@ -892,7 +894,7 @@ if ($action == 'edit') {
|
|||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_FORCE_SENDTO").'</td><td>'.getDolGlobalString('MAIN_MAIL_FORCE_SENDTO');
|
||||
if (getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')) {
|
||||
if (!isValidEmail(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) {
|
||||
print img_warning($langs->trans("ErrorBadEMail"));
|
||||
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')));
|
||||
} else {
|
||||
print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue"));
|
||||
}
|
||||
|
|
@ -910,7 +912,7 @@ if ($action == 'edit') {
|
|||
if (!getDolGlobalString('MAIN_MAIL_EMAIL_FROM')) {
|
||||
print img_warning($langs->trans("Mandatory"));
|
||||
} elseif (!isValidEmail(getDolGlobalString('MAIN_MAIL_EMAIL_FROM'))) {
|
||||
print img_warning($langs->trans("ErrorBadEMail"));
|
||||
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_EMAIL_FROM')));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -958,7 +960,7 @@ if ($action == 'edit') {
|
|||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_ERRORS_TO").'</td>';
|
||||
print '<td>'.(getDolGlobalString('MAIN_MAIL_ERRORS_TO'));
|
||||
if (getDolGlobalString('MAIN_MAIL_ERRORS_TO') && !isValidEmail(getDolGlobalString('MAIN_MAIL_ERRORS_TO'))) {
|
||||
print img_warning($langs->trans("ErrorBadEMail"));
|
||||
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_ERRORS_TO')));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -104,6 +104,10 @@ if ($action == 'update' && !$cancel) {
|
|||
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET"), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET"), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (GETPOSTISSET("MAIN_MAIL_EMAIL_FROM_PASSWORDRESET")) {
|
||||
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_FROM_PASSWORDRESET", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||
exit;
|
||||
}
|
||||
|
|
@ -349,6 +353,7 @@ if ($action == 'edit') {
|
|||
|
||||
clearstatcache();
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td></td></tr>';
|
||||
|
||||
|
|
@ -553,6 +558,26 @@ if ($action == 'edit') {
|
|||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("OtherOptions").'</td><td></td></tr>';
|
||||
|
||||
// From
|
||||
$help = $form->textwithpicto('', $langs->trans("EMailHelpMsgSPFDKIM"));
|
||||
print '<tr class="oddeven"><td class="">';
|
||||
print $langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ? ini_get('sendmail_from') : $langs->transnoentities("Undefined"));
|
||||
print ' '.$help;
|
||||
print '</td>';
|
||||
print '<td><input class="flat minwidth300" name="MAIN_MAIL_EMAIL_FROM_PASSWORDRESET" value="'.getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET');
|
||||
print '"></td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
|
@ -685,6 +710,36 @@ if ($action == 'edit') {
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("OtherOptions").'</td><td></td></tr>';
|
||||
|
||||
// From
|
||||
$help = $form->textwithpicto('', $langs->trans("EMailHelpMsgSPFDKIM"));
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ? ini_get('sendmail_from') : $langs->transnoentities("Undefined"));
|
||||
print ' '.$help;
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET')) {
|
||||
print '<span class="opacitymedium">'.getDolGlobalString('MAIN_MAIL_EMAIL_FROM').'</span>';
|
||||
} else {
|
||||
print getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET');
|
||||
}
|
||||
if (!getDolGlobalString('MAIN_MAIL_EMAIL_FROM') && !getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET')) {
|
||||
print img_warning($langs->trans("Mandatory"));
|
||||
} elseif (getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET') && !isValidEmail(getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET'))) {
|
||||
print img_warning($langs->trans("ErrorBadEMail", getDolGlobalString('MAIN_MAIL_EMAIL_FROM_PASSWORDRESET')));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -224,11 +224,33 @@ if (isModEnabled('propal')) {
|
|||
print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
|
||||
print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, getDolGlobalString('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans("AvailableWithSomePDFTemplatesOnly"));
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('PDF_PROPAL_SHOW_PRICE_INCL_TAX');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("PDF_PROPAL_SHOW_PRICE_INCL_TAX", $arrval, getDolGlobalString('PDF_PROPAL_SHOW_PRICE_INCL_TAX'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral"));
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, getDolGlobalString('MAIN_GENERATE_PROPOSALS_WITH_PICTURE'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_PDF_ADD_TERMSOFSALE_PROPAL"), $langs->trans("PdfAddTermOfSaleHelp"));
|
||||
print '</td><td>';
|
||||
|
|
@ -236,18 +258,7 @@ if (isModEnabled('propal')) {
|
|||
print ajax_constantonoff('MAIN_PDF_ADD_TERMSOFSALE_PROPAL');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_PROPAL", $arrval, $conf->global->MAIN_PDF_ADD_TERMSOFSALE_PROPAL);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral"));
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
|
||||
print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_PROPAL", $arrval, getDolGlobalString('MAIN_PDF_ADD_TERMSOFSALE_PROPAL'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -261,7 +272,31 @@ if (isModEnabled('order')) {
|
|||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px"></td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans("AvailableWithSomePDFTemplatesOnly"));
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('PDF_ORDER_SHOW_PRICE_INCL_TAX');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("PDF_ORDER_SHOW_PRICE_INCL_TAX", $arrval, getDolGlobalString('PDF_ORDER_SHOW_PRICE_INCL_TAX'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral"));
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_ORDERS_WITH_PICTURE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_ORDERS_WITH_PICTURE", $arrval, getDolGlobalString('MAIN_GENERATE_ORDERS_WITH_PICTURE'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_PDF_ADD_TERMSOFSALE_ORDER"), $langs->trans("PdfAddTermOfSaleHelp"));
|
||||
print '</td><td>';
|
||||
|
|
@ -269,18 +304,18 @@ if (isModEnabled('order')) {
|
|||
print ajax_constantonoff('MAIN_PDF_ADD_TERMSOFSALE_ORDER');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_ORDER", $arrval, $conf->global->MAIN_PDF_ADD_TERMSOFSALE_ORDER);
|
||||
print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_ORDER", $arrval, getDolGlobalString('MAIN_PDF_ADD_TERMSOFSALE_ORDER'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("SALES_ORDER_SHOW_SHIPPING_ADDRESS"), $langs->trans("SALES_ORDER_SHOW_SHIPPING_ADDRESSMore"));
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('SALES_ORDER_SHOW_SHIPPING_ADDRESS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->SALES_ORDER_SHOW_SHIPPING_ADDRESS);
|
||||
print $form->selectarray("SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval, getDolGlobalString('SALES_ORDER_SHOW_SHIPPING_ADDRESS'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -289,74 +324,6 @@ if (isModEnabled('order')) {
|
|||
}
|
||||
|
||||
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$langs->load("supplier_proposal");
|
||||
print load_fiche_titre($langs->trans("SupplierProposal"), '', 'supplier_proposal');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"), '');
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"), '');
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
if (isModEnabled('supplier_order')) {
|
||||
$langs->load("supplier_order");
|
||||
print load_fiche_titre($langs->trans("SupplierOrder"), '', 'supplier_proposal');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"), '');
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"), '');
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if (isModEnabled('invoice')) {
|
||||
print load_fiche_titre($langs->trans("Invoices"), '', 'bill');
|
||||
|
|
@ -365,6 +332,28 @@ if (isModEnabled('invoice')) {
|
|||
print '<table summary="more" class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px"></td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans("AvailableWithSomePDFTemplatesOnly"));
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('PDF_INVOICE_SHOW_PRICE_INCL_TAX');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("PDF_INVOICE_SHOW_PRICE_INCL_TAX", $arrval, getDolGlobalString('PDF_INVOICE_SHOW_PRICE_INCL_TAX'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral"));
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_INVOICES_WITH_PICTURE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_INVOICES_WITH_PICTURE", $arrval, getDolGlobalString('MAIN_GENERATE_INVOICES_WITH_PICTURE'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_PDF_ADD_TERMSOFSALE_INVOICE"), $langs->trans("PdfAddTermOfSaleHelp"));
|
||||
print '</td><td>';
|
||||
|
|
@ -372,9 +361,10 @@ if (isModEnabled('invoice')) {
|
|||
print ajax_constantonoff('MAIN_PDF_ADD_TERMSOFSALE_INVOICE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_INVOICE", $arrval, $conf->global->MAIN_PDF_ADD_TERMSOFSALE_INVOICE);
|
||||
print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_INVOICE", $arrval, getDolGlobalString('MAIN_PDF_ADD_TERMSOFSALE_INVOICE'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans("INVOICE_ADD_ZATCA_QR_CODEMore"));
|
||||
print '</td><td>';
|
||||
|
|
@ -430,7 +420,7 @@ if (isModEnabled('invoice')) {
|
|||
print ajax_constantonoff('INVOICE_SHOW_SHIPPING_ADDRESS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->INVOICE_SHOW_SHIPPING_ADDRESS);
|
||||
print $form->selectarray("INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, getDolGlobalString('INVOICE_SHOW_SHIPPING_ADDRESS'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -466,7 +456,77 @@ if (isModEnabled('invoice')) {
|
|||
print ajax_constantonoff('INVOICE_HIDE_LINKED_OBJECT');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("INVOICE_HIDE_LINKED_OBJECT", $arrval, $conf->global->INVOICE_HIDE_LINKED_OBJECT);
|
||||
print $form->selectarray("INVOICE_HIDE_LINKED_OBJECT", $arrval, getDolGlobalString('INVOICE_HIDE_LINKED_OBJECT'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$langs->load("supplier_proposal");
|
||||
print load_fiche_titre($langs->trans("SupplierProposal"), '', 'supplier_proposal');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"), '');
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval, getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"), '');
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval, getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
if (isModEnabled('supplier_order')) {
|
||||
$langs->load("supplier_order");
|
||||
print load_fiche_titre($langs->trans("SupplierOrder"), '', 'supplier_proposal');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"), '');
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval, getDolGlobalString('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"), '');
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval, getDolGlobalString('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -495,7 +555,6 @@ if (isModEnabled('shipping')) {
|
|||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
if (isModEnabled('reception')) {
|
||||
print load_fiche_titre($langs->trans("Receptions"), '', 'reception');
|
||||
|
||||
|
|
@ -572,7 +631,7 @@ $maxfilesizearray = getMaxFileSizeArray();
|
|||
$tooltiptermsofsale .= ($maxfilesizearray['maxmin'] > 0) ? '<br>'.$langs->trans('MaxSize').' : '.$maxfilesizearray['maxmin'].' '.$langs->trans('Kb') : '';
|
||||
$documenturl = DOL_URL_ROOT.'/document.php';
|
||||
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) {
|
||||
$documenturl = $conf->global->DOL_URL_ROOT_DOCUMENT_PHP;
|
||||
$documenturl = getDolGlobalString('DOL_URL_ROOT_DOCUMENT_PHP');
|
||||
}
|
||||
$modulepart = 'mycompany';
|
||||
|
||||
|
|
|
|||
|
|
@ -469,6 +469,12 @@ if ($filtert > 0 || $usergroup > 0) {
|
|||
if ($usergroup > 0) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element";
|
||||
}
|
||||
|
||||
// Add table from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= " WHERE a.entity IN (".getEntity('agenda').")";
|
||||
// Condition on actioncode
|
||||
if (!empty($actioncode)) {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class Facture extends CommonInvoice
|
|||
protected $table_ref_field = 'ref';
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
* @var int|null ID
|
||||
* @deprecated Use $user_creation_id
|
||||
*/
|
||||
public $fk_user_author;
|
||||
|
|
@ -2554,9 +2554,12 @@ class Facture extends CommonInvoice
|
|||
if (isset($this->retained_warranty)) {
|
||||
$this->retained_warranty = (float) $this->retained_warranty;
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
if (!isset($this->user_creation_id) && isset($this->fk_user_author) ) {
|
||||
$this->user_creation_id = $this->fk_user_author;
|
||||
}
|
||||
if (!isset($this->user_validation_id) && isset($this->fk_user_valid) ) {
|
||||
$this->user_validation_id = $this->fk_user_valid;
|
||||
}
|
||||
|
||||
// Update request
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET";
|
||||
|
|
@ -2581,7 +2584,8 @@ class Facture extends CommonInvoice
|
|||
$sql .= " total_ttc=".(isset($this->total_ttc) ? (float) $this->total_ttc : "null").",";
|
||||
$sql .= " revenuestamp=".((isset($this->revenuestamp) && $this->revenuestamp != '') ? (float) $this->revenuestamp : "null").",";
|
||||
$sql .= " fk_statut=".(isset($this->status) ? (int) $this->status : "null").",";
|
||||
$sql .= " fk_user_valid=".(isset($this->fk_user_valid) ? (int) $this->fk_user_valid : "null").",";
|
||||
$sql .= " fk_user_author=".(isset($this->user_creation_id) ? ((int) $this->user_creation_id) : "null").",";
|
||||
$sql .= " fk_user_valid=".(isset($this->user_validation_id) ? (int) $this->user_validation_id : "null").",";
|
||||
$sql .= " fk_facture_source=".(isset($this->fk_facture_source) ? (int) $this->fk_facture_source : "null").",";
|
||||
$sql .= " fk_projet=".(isset($this->fk_project) ? (int) $this->fk_project : "null").",";
|
||||
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? (int) $this->cond_reglement_id : "null").",";
|
||||
|
|
@ -3324,10 +3328,17 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
}
|
||||
if ($key == 'TVA_INTRA') {
|
||||
// Check for mandatory
|
||||
if (getDolGlobalString('SOCIETE_VAT_INTRA_INVOICE_MANDATORY') && ($this->thirdparty->tva_assuj) && empty($this->thirdparty->tva_intra)) {
|
||||
// Check for mandatory vat number
|
||||
if (getDolGlobalString('SOCIETE_VAT_INTRA_INVOICE_MANDATORY') == 'eeconly') {
|
||||
if (($this->thirdparty->tva_assuj) && empty($this->thirdparty->tva_intra) && $this->thirdparty->isInEEC()) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorProdIdIsMandatoryForEuThirdparties', $langs->transnoentitiesnoconv('VATIntra')).' ('.$langs->transnoentitiesnoconv("ForbiddenBySetupRules").') ['.$langs->trans('Company').' : '.$this->thirdparty->name.']';
|
||||
dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
} elseif (getDolGlobalString('SOCIETE_VAT_INTRA_INVOICE_MANDATORY') && ($this->thirdparty->tva_assuj) && empty($this->thirdparty->tva_intra)) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorProdIdIsMandatory', $langs->trans('VATIntra')).' ('.$langs->trans("ForbiddenBySetupRules").') ['.$langs->trans('Company').' : '.$this->thirdparty->name.']';
|
||||
$this->error = $langs->trans('ErrorProdIdIsMandatory', $langs->transnoentitiesnoconv('VATIntra')).' ('.$langs->transnoentitiesnoconv("ForbiddenBySetupRules").') ['.$langs->trans('Company').' : '.$this->thirdparty->name.']';
|
||||
dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ abstract class CommonObject
|
|||
public $user_creation;
|
||||
|
||||
/**
|
||||
* @var int User id author/creation
|
||||
* @var int|null User id author/creation
|
||||
*/
|
||||
public $user_creation_id;
|
||||
|
||||
|
|
|
|||
|
|
@ -2683,9 +2683,54 @@ function addMailingEventTypeSQL($actioncode, $objcon, $filterobj)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show header of company in HTML public pages
|
||||
*
|
||||
* @param Societe $mysoc Third party
|
||||
* @param Translate $langs Output language
|
||||
* @return void
|
||||
*/
|
||||
function htmlPrintOnlineHeader($mysoc, $langs)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Define urllogo
|
||||
$urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png';
|
||||
|
||||
if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) {
|
||||
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small);
|
||||
} elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) {
|
||||
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
|
||||
} elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) {
|
||||
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg';
|
||||
}
|
||||
|
||||
print '<header class="center">';
|
||||
|
||||
// Output html code for logo
|
||||
if ($urllogo) {
|
||||
print '<div class="backgreypublicpayment">';
|
||||
print '<div class="logopublicpayment">';
|
||||
print '<img id="dolpaymentlogo" src="'.$urllogo.'">';
|
||||
print '</div>';
|
||||
if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) {
|
||||
print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||
}
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if (getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION')) {
|
||||
print '<div class="backimagepublicregistration">';
|
||||
print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION').'">';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '</header>';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show footer of company in HTML pages
|
||||
* Show footer of company in HTML public pages
|
||||
*
|
||||
* @param Societe $fromcompany Third party
|
||||
* @param Translate $langs Output language
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class pdf_proforma extends pdf_eratosthene
|
|||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
global $langs;
|
||||
|
||||
parent::__construct($db);
|
||||
|
||||
|
|
|
|||
|
|
@ -1013,9 +1013,17 @@ class EcmFiles extends CommonObject
|
|||
} elseif ($option == 'commande_fournisseur') {
|
||||
$tmppath = preg_replace('/^fournisseur\/commande\//', '', $this->filepath);
|
||||
} else {
|
||||
$tmppath = preg_replace('/^[^\/]+\//', '', $this->filepath);
|
||||
if ((int) $this->entity > 1) {
|
||||
// Remove the part "entityid/commande/" into "entityid/commande/REFXXX" to get only the ref
|
||||
$tmppath = preg_replace('/^\d+\/[^\/]+\//', '', $this->filepath);
|
||||
} else {
|
||||
// Remove the part "commande/" into "commande/REFXXX" to get only the ref
|
||||
$tmppath = preg_replace('/^[^\/]+\//', '', $this->filepath);
|
||||
}
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/document.php?modulepart='.urlencode($option).'&file='.urlencode($tmppath.'/'.$this->filename).'&entity='.$this->entity;
|
||||
//var_dump($this->filepath);
|
||||
|
||||
$url = DOL_URL_ROOT.'/document.php?modulepart='.urlencode($option).'&file='.urlencode($tmppath.'/'.$this->filename).'&entity='.((int) $this->entity);
|
||||
} else {
|
||||
$url = DOL_URL_ROOT.'/ecm/file_card.php?id='.$this->id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -785,13 +785,16 @@ if ($object->id > 0 || !empty($object->ref)) {
|
|||
print '</td>'; // Dispatch column
|
||||
print '<td></td>'; // Warehouse column
|
||||
|
||||
$sql = "SELECT ed.rowid, ed.qty, ed.fk_entrepot,";
|
||||
$sql .= " eb.batch, eb.eatby, eb.sellby, cd.fk_product";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expeditiondet_batch as eb on ed.rowid = eb.fk_expeditiondet";
|
||||
$sql .= " JOIN ".MAIN_DB_PREFIX."commandedet as cd on ed.fk_elementdet = cd.rowid";
|
||||
$sql .= " WHERE ed.fk_elementdet =".(int) $objp->rowid;
|
||||
$sql .= " AND ed.fk_expedition =".(int) $object->id;
|
||||
$sql = "SELECT ed.rowid";
|
||||
$sql .= ", cd.fk_product";
|
||||
$sql .= ", ".$db->ifsql('eb.rowid IS NULL', 'ed.qty', 'eb.qty')." as qty";
|
||||
$sql .= ", ed.fk_entrepot";
|
||||
$sql .= ", eb.batch, eb.eatby, eb.sellby";
|
||||
$sql .= " FROM ".$db->prefix()."expeditiondet as ed";
|
||||
$sql .= " LEFT JOIN ".$db->prefix()."expeditiondet_batch as eb on ed.rowid = eb.fk_expeditiondet";
|
||||
$sql .= " INNER JOIN ".$db->prefix()."commandedet as cd on ed.fk_origin_line = cd.rowid";
|
||||
$sql .= " WHERE ed.fk_origin_line = ".(int) $objp->rowid;
|
||||
$sql .= " AND ed.fk_expedition = ".(int) $object->id;
|
||||
$sql .= " ORDER BY ed.rowid, ed.fk_elementdet";
|
||||
|
||||
$resultsql = $db->query($sql);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ $result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, becaus
|
|||
|
||||
$permissiontoread = $user->hasRight('expedition', 'lire');
|
||||
$permissiontoadd = $user->hasRight('expedition', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->hasRight('expedition', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissiontodelete = $user->hasRight('expedition', 'supprimer') || ($permissiontoadd && ((int) $object->status == $object::STATUS_DRAFT));
|
||||
$permissionnote = $user->hasRight('expedition', 'creer'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->hasRight('expedition', 'creer'); // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
|
|
|||
|
|
@ -737,6 +737,7 @@ if (empty($reshook)) {
|
|||
unset($_POST['date_end_fill']);
|
||||
unset($_POST['situations']);
|
||||
unset($_POST['progress']);
|
||||
unset($_POST['fourn_ref']);
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
|
@ -879,6 +880,7 @@ if (empty($reshook)) {
|
|||
unset($_POST['date_endyear']);
|
||||
unset($_POST['situations']);
|
||||
unset($_POST['progress']);
|
||||
unset($_POST['fourn_ref']);
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -412,6 +412,7 @@ SaleExport=Export sale
|
|||
SaleEEC=Sale in EEC
|
||||
SaleEECWithVAT=Sale in EEC with a VAT not null, so we suppose this is NOT an intracommunautary sale and the suggested account is the standard product account.
|
||||
SaleEECWithoutVATNumber=Sale in EEC with no VAT but the VAT ID of third party is not defined. We fall back on the account for standard sales. You can fix the VAT ID of the third party, or change the product account suggested for binding if needed.
|
||||
AnySale=Any sale
|
||||
ForbiddenTransactionAlreadyExported=Forbidden: The transaction has been validated and/or exported.
|
||||
ForbiddenTransactionAlreadyValidated=Forbidden: The transaction has been validated.
|
||||
DataMustHaveBeenTransferredInAccounting=The transfer of data in accounting must have been done
|
||||
|
|
|
|||
|
|
@ -2137,6 +2137,7 @@ MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
|
|||
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
|
||||
DOC_SHOW_FIRST_SALES_REP=Show first sales representative
|
||||
MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add column for picture on proposal lines
|
||||
MAIN_GENERATE_DOCUMENTS_WITH_PICTURE=Add column for picture on document lines
|
||||
MAIN_DOCUMENTS_WITH_PICTURE_WIDTH=Width of the column if a picture is added on lines
|
||||
MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE=Hide the unit price column on quotation requests
|
||||
MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN=Hide the total price column on quotation requests
|
||||
|
|
@ -2611,3 +2612,5 @@ UploadExtensionRestriction=List of forbidden file extensions to upload
|
|||
UploadExtensionRestrictionExemple=htm, html, shtml, js, php
|
||||
Privileges=Privileges
|
||||
FieldsLinked=Fields Linked
|
||||
PDF_XXX_SHOW_PRICE_INCL_TAX=Show column Price including tax
|
||||
AvailableWithSomePDFTemplatesOnly=Feature not supported on old PDF templates
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ ErrorFromToAccountsMustDiffers=Source and targets bank accounts must be differen
|
|||
ErrorBadThirdPartyName=Bad value for third-party name
|
||||
ForbiddenBySetupRules=Forbidden by setup rules
|
||||
ErrorProdIdIsMandatory=The %s is mandatory
|
||||
ErrorProdIdIsMandatoryForEuThirdparties=The %s is mandatory for customers in EEC
|
||||
ErrorAccountancyCodeCustomerIsMandatory=The accountancy code of customer %s is mandatory
|
||||
ErrorAccountancyCodeSupplierIsMandatory=The accountancy code of supplier %s is mandatory
|
||||
ErrorBadCustomerCodeSyntax=Bad syntax for customer code
|
||||
|
|
|
|||
|
|
@ -5561,8 +5561,6 @@ class Product extends CommonObject
|
|||
*/
|
||||
public function getChildsArbo($id, $firstlevelonly = 0, $level = 1, $parents = array())
|
||||
{
|
||||
global $alreadyfound;
|
||||
|
||||
if (empty($id)) {
|
||||
return array();
|
||||
}
|
||||
|
|
@ -5579,9 +5577,6 @@ class Product extends CommonObject
|
|||
|
||||
dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level. ' parents='.(is_array($parents) ? implode(',', $parents) : $parents), LOG_DEBUG);
|
||||
|
||||
if ($level == 1) {
|
||||
$alreadyfound = array($id => 1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediately
|
||||
}
|
||||
// Protection against infinite loop
|
||||
if ($level > 30) {
|
||||
return array();
|
||||
|
|
@ -5590,14 +5585,16 @@ class Product extends CommonObject
|
|||
$res = $this->db->query($sql);
|
||||
if ($res) {
|
||||
$prods = array();
|
||||
if ($this->db->num_rows($res) > 0) {
|
||||
$parents[] = $id;
|
||||
}
|
||||
|
||||
while ($rec = $this->db->fetch_array($res)) {
|
||||
if (!empty($alreadyfound[$rec['rowid']])) {
|
||||
if (in_array($rec['id'], $parents)) {
|
||||
dol_syslog(get_class($this).'::getChildsArbo the product id='.$rec['rowid'].' was already found at a higher level in tree. We discard to avoid infinite loop', LOG_WARNING);
|
||||
if (in_array($rec['id'], $parents)) {
|
||||
continue; // We discard this child if it is already found at a higher level in tree in the same branch.
|
||||
}
|
||||
continue; // We discard this child if it is already found at a higher level in tree in the same branch.
|
||||
}
|
||||
$alreadyfound[$rec['rowid']] = 1;
|
||||
|
||||
$prods[$rec['rowid']] = array(
|
||||
0 => $rec['rowid'],
|
||||
1 => $rec['qty'],
|
||||
|
|
@ -5611,7 +5608,6 @@ class Product extends CommonObject
|
|||
//$prods[$this->db->escape($rec['label'])]= array(0=>$rec['id'],1=>$rec['qty'],2=>$rec['fk_product_type']);
|
||||
//$prods[$this->db->escape($rec['label'])]= array(0=>$rec['id'],1=>$rec['qty']);
|
||||
if (empty($firstlevelonly)) {
|
||||
$parents[] = $rec['rowid'];
|
||||
$listofchilds = $this->getChildsArbo($rec['rowid'], 0, $level + 1, $parents);
|
||||
foreach ($listofchilds as $keyChild => $valueChild) {
|
||||
$prods[$rec['rowid']]['childs'][$keyChild] = $valueChild;
|
||||
|
|
|
|||
|
|
@ -978,7 +978,7 @@ if (getDolGlobalString('MEMBER_SKIP_TABLE') || getDolGlobalString('MEMBER_NEWFOR
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//htmlPrintOnlineFooter($mysoc, $langs);
|
||||
llxFooterVierge();
|
||||
|
||||
$db->close();
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') { // Test on pemriss
|
|||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$head = '';
|
||||
if (getDolGlobalString('MAIN_SIGN_CSS_URL')) {
|
||||
$head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('MAIN_SIGN_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n";
|
||||
|
|
@ -241,8 +242,12 @@ if (getDolGlobalString('MAIN_SIGN_CSS_URL')) {
|
|||
$conf->dol_hide_topmenu = 1;
|
||||
$conf->dol_hide_leftmenu = 1;
|
||||
|
||||
$title = $langs->trans("OnlineSignature");
|
||||
|
||||
$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
|
||||
llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1);
|
||||
llxHeader($head, $title, '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1);
|
||||
|
||||
htmlPrintOnlineHeader($mysoc, $langs);
|
||||
|
||||
if ($action == 'refusepropal') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY).(isModEnabled('multicompany') ? '&entity='.$entity : ''), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
|
||||
|
|
@ -862,6 +867,7 @@ if ($action == "dosign" && empty($cancel)) {
|
|||
}
|
||||
print '</td></tr>'."\n";
|
||||
print '</table>'."\n";
|
||||
|
||||
print '</form>'."\n";
|
||||
print '</div>'."\n";
|
||||
print '<br>';
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||
* @var User $user
|
||||
*/
|
||||
|
||||
$langs->loadLangs(array("admin", "companies", "other"));
|
||||
$langs->loadLangs(array("admin", "accountancy", "companies", "other"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$value = GETPOST('value', 'alpha');
|
||||
|
|
@ -329,9 +329,11 @@ if ($action == 'setprofidmandatory') {
|
|||
}
|
||||
|
||||
//Activate ProfId invoice mandatory
|
||||
if ($action == 'setprofidinvoicemandatory') {
|
||||
if ($action == 'setprofidinvoicemandatory' || $action == 'setprofidinvoicemandatoryeeconly') {
|
||||
$status = GETPOST('status', 'alpha');
|
||||
|
||||
if ($status == '1' && $action == 'setprofidinvoicemandatoryeeconly') {
|
||||
$status = 'eeconly';
|
||||
}
|
||||
$idprof = "SOCIETE_".$value."_INVOICE_MANDATORY";
|
||||
$result = dolibarr_set_const($db, $idprof, $status, 'chaine', 0, '', $conf->entity);
|
||||
if ($result <= 0) {
|
||||
|
|
@ -777,31 +779,52 @@ print '<td colspan="2">'.$langs->trans('VATIntra')."</td>\n";
|
|||
$key = 'VAT_INTRA';
|
||||
if (getDolGlobalString('SOCIETE_VAT_INTRA_UNIQUE')) {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofid&token='.newToken().'&value='.$key.'&status=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', 'class="valignmiddle"');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofid&token='.newToken().'&value='.$key.'&status=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off', 'class="valignmiddle"');
|
||||
print '</a></td>';
|
||||
}
|
||||
if (getDolGlobalString('SOCIETE_VAT_INTRA_MANDATORY')) {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidmandatory&token='.newToken().'&value='.$key.'&status=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', 'class="valignmiddle"');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidmandatory&token='.newToken().'&value='.$key.'&status=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off', 'class="valignmiddle"');
|
||||
print '</a></td>';
|
||||
}
|
||||
if (getDolGlobalString('SOCIETE_VAT_INTRA_INVOICE_MANDATORY')) {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatory&token='.newToken().'&value='.$key.'&status=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
print '<td class="center">';
|
||||
if (getDolGlobalString('SOCIETE_VAT_INTRA_INVOICE_MANDATORY') == 'eeconly') {
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatoryeeconly&token='.newToken().'&value='.$key.'&status=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', 'class="valignmiddle paddingrightonly"');
|
||||
print '</a>';
|
||||
print $langs->trans("SaleEEC").'<br>';
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatory&token='.newToken().'&value='.$key.'&status=1">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_off', 'class="valignmiddle paddingrightonly"');
|
||||
print '</a>';
|
||||
print $langs->trans("AnySale");
|
||||
} elseif (getDolGlobalString('SOCIETE_VAT_INTRA_INVOICE_MANDATORY')) {
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatoryeeconly&token='.newToken().'&value='.$key.'&status=1">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_off', 'class="valignmiddle paddingrightonly"');
|
||||
print '</a>';
|
||||
print $langs->trans("SaleEEC").'<br>';
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatory&token='.newToken().'&value='.$key.'&status=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', 'class="valignmiddle paddingrightonly"');
|
||||
print '</a>';
|
||||
print $langs->trans("AnySale");
|
||||
} else {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatory&token='.newToken().'&value='.$key.'&status=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatoryeeconly&token='.newToken().'&value='.$key.'&status=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off', 'class="valignmiddle paddingrightonly"');
|
||||
print '</a>';
|
||||
print $langs->trans("SaleEEC").'<br>';
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatory&token='.newToken().'&value='.$key.'&status=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off', 'class="valignmiddle paddingrightonly"');
|
||||
print '</a>';
|
||||
print $langs->trans("AnySale");
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table>\n";
|
||||
|
|
|
|||
|
|
@ -2650,7 +2650,7 @@ class User extends CommonObject
|
|||
public function send_password($user, $password = '', $changelater = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $mysoc;
|
||||
global $conf, $langs;
|
||||
global $dolibarr_main_url_root;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
|
|
@ -2663,12 +2663,12 @@ class User extends CommonObject
|
|||
$outputlangs = new Translate("", $conf);
|
||||
|
||||
if (isset($this->conf->MAIN_LANG_DEFAULT)
|
||||
&& $this->conf->MAIN_LANG_DEFAULT != 'auto') { // If user has defined its own language (rare because in most cases, auto is used)
|
||||
$outputlangs->getDefaultLang($this->conf->MAIN_LANG_DEFAULT);
|
||||
&& getDolGlobalString('MAIN_LANG_DEFAULT') != 'auto') { // If user has defined its own language (rare because in most cases, auto is used)
|
||||
$outputlangs->getDefaultLang(getDolGlobalString('MAIN_LANG_DEFAULT'));
|
||||
}
|
||||
|
||||
if ($this->conf->MAIN_LANG_DEFAULT) {
|
||||
$outputlangs->setDefaultLang($this->conf->MAIN_LANG_DEFAULT);
|
||||
if (getDolGlobalString('MAIN_LANG_DEFAULT')) {
|
||||
$outputlangs->setDefaultLang(getDolGlobalString('MAIN_LANG_DEFAULT'));
|
||||
} else { // If user has not defined its own language, we used current language
|
||||
$outputlangs = $langs;
|
||||
}
|
||||
|
|
@ -2729,7 +2729,7 @@ class User extends CommonObject
|
|||
$mailfile = new CMailFile(
|
||||
$subject,
|
||||
$this->email,
|
||||
$conf->global->MAIN_MAIL_EMAIL_FROM,
|
||||
getDolGlobalString("MAIN_MAIL_EMAIL_FROM_PASSWORDRESET", getDolGlobalString("MAIN_MAIL_EMAIL_FROM")),
|
||||
$mesg,
|
||||
array(),
|
||||
array(),
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class WebPortalOrder extends Commande
|
|||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
$datas = [];
|
||||
|
||||
|
|
@ -174,9 +174,8 @@ class WebPortalOrder extends Commande
|
|||
return ['optimize' => $langs->trans("WebPortalOrder")];
|
||||
}
|
||||
$datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalOrder") . '</u>';
|
||||
if (isset($this->status)) {
|
||||
$datas['picto'] .= ' ' . $this->getLibStatut(5);
|
||||
}
|
||||
$datas['picto'] .= ' ' . $this->getLibStatut(5);
|
||||
|
||||
$datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
|
||||
return $datas;
|
||||
|
|
|
|||
Loading…
Reference in a new issue