Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b45c99faec
@ -445,7 +445,7 @@ if ($action == 'delete')
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT rowid as rowid, label, type_template, lang, fk_user, private, position, topic, joinfiles, content_lines, content, enabled, active";
|
||||
$sql = "SELECT rowid as rowid, module, label, type_template, lang, fk_user, private, position, topic, joinfiles, content_lines, content, enabled, active";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_email_templates";
|
||||
$sql .= " WHERE entity IN (".getEntity('email_template').")";
|
||||
if (!$user->admin)
|
||||
@ -795,6 +795,13 @@ if ($resql)
|
||||
|
||||
print "</tr>\n";
|
||||
} else {
|
||||
if ($obj->module) {
|
||||
$tempmodulekey = $obj->module;
|
||||
if (empty($conf->$tempmodulekey) || empty($conf->$tempmodulekey->enabled)) {
|
||||
$i++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$keyforobj = 'type_template';
|
||||
if (!in_array($obj->$keyforobj, array_keys($elementList)))
|
||||
{
|
||||
|
||||
@ -774,7 +774,7 @@ if ($resql)
|
||||
{
|
||||
if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT))
|
||||
{
|
||||
if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments
|
||||
if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // Default is to record miscellaneous direct entries using miscellaneous payments
|
||||
{
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)), '', $user->rights->banque->modifier);
|
||||
} else // If direct entries is not done using miscellaneous payments
|
||||
|
||||
@ -39,6 +39,9 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php';
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
@ -203,6 +206,10 @@ $arrayfields = array(
|
||||
'f.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>200),
|
||||
'multicurrency_dynamount_payed'=>array('label'=>'MulticurrencyAlreadyPaid', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>210),
|
||||
'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>220), // Not enabled by default because slow
|
||||
'total_pa' => array('label' => ($conf->global->MARGIN_TYPE == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (empty($conf->margin->enabled)?0:1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (empty($conf->margin->enabled)?0:1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (empty($conf->margin->enabled) || empty($conf->global->DISPLAY_MARGIN_RATES)?0:1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (empty($conf->margin->enabled) || empty($conf->global->DISPLAY_MARK_RATES)?0:1)),
|
||||
'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
||||
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))),
|
||||
@ -405,6 +412,10 @@ if ($massaction == 'makepayment'){
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formmargin = null;
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
$formmargin = new FormMargin($db);
|
||||
}
|
||||
$bankaccountstatic = new Account($db);
|
||||
$facturestatic = new Facture($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
@ -1019,6 +1030,26 @@ if ($resql)
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['total_pa']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['total_margin']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['total_margin_rate']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['total_mark_rate']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
@ -1102,6 +1133,10 @@ if ($resql)
|
||||
if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['multicurrency_dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['multicurrency_rtp']['checked'])) print_liste_field_titre($arrayfields['multicurrency_rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['total_pa']['checked'])) print_liste_field_titre($arrayfields['total_pa']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['total_margin']['checked'])) print_liste_field_titre($arrayfields['total_margin']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['total_margin_rate']['checked'])) print_liste_field_titre($arrayfields['total_margin_rate']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['total_mark_rate']['checked'])) print_liste_field_titre($arrayfields['total_mark_rate']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
@ -1205,6 +1240,12 @@ if ($resql)
|
||||
|
||||
$facturestatic->alreadypaid = $paiement;
|
||||
|
||||
$marginInfo = array();
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
$facturestatic->fetch_lines();
|
||||
$marginInfo = $formmargin->getMarginInfosArray($facturestatic);
|
||||
}
|
||||
|
||||
print '<tr class="oddeven"';
|
||||
if ($contextpage == 'poslist')
|
||||
{
|
||||
@ -1541,6 +1582,31 @@ if ($resql)
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Total buying or cost price
|
||||
if (!empty($arrayfields['total_pa']['checked']))
|
||||
{
|
||||
print '<td class="right nowrap">' . price($marginInfo['pa_total']) . '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Total margin
|
||||
if (!empty($arrayfields['total_margin']['checked']))
|
||||
{
|
||||
print '<td class="right nowrap">' . price($marginInfo['total_margin']) . '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Total margin rate
|
||||
if (!empty($arrayfields['total_margin_rate']['checked']))
|
||||
{
|
||||
print '<td class="right nowrap">' . (($marginInfo['total_margin_rate'] == '')?'':price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%') . '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// total mark rate
|
||||
if (!empty($arrayfields['total_mark_rate']['checked']))
|
||||
{
|
||||
print '<td class="right nowrap">' . (($marginInfo['total_mark_rate'] == '')?'':price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%') . '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
|
||||
@ -290,6 +290,8 @@ if (!function_exists('dol_loginfunction'))
|
||||
// Include login page template
|
||||
include $template_dir.'login.tpl.php';
|
||||
|
||||
// Global html output events ($mesgs, $errors, $warnings)
|
||||
dol_htmloutput_events(0);
|
||||
|
||||
$_SESSION["dol_loginmesg"] = '';
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ $refname = basename(dirname($original_file)."/");
|
||||
if (empty($modulepart)) accessforbidden('Bad value for parameter modulepart');
|
||||
|
||||
// Check security and set return info with full path of file
|
||||
$check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname);
|
||||
$check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $user, $refname);
|
||||
$accessallowed = $check_access['accessallowed'];
|
||||
$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
|
||||
$fullpath_original_file = $check_access['original_file']; // $fullpath_original_file is now a full path name
|
||||
|
||||
@ -480,7 +480,7 @@ ModuleCompanyCodeSupplierDigitaria=%s followed by the truncated supplier name by
|
||||
Use3StepsApproval=By default, Purchase Orders need to be created and approved by 2 different users (one step/user to create and one step/user to approve. Note that if user has both permission to create and approve, one step/user will be enough). You can ask with this option to introduce a third step/user approval, if amount is higher than a dedicated value (so 3 steps will be necessary: 1=validation, 2=first approval and 3=second approval if amount is enough).<br>Set this to empty if one approval (2 steps) is enough, set it to a very low value (0.1) if a second approval (3 steps) is always required.
|
||||
UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than...
|
||||
WarningPHPMail=WARNING: The setup to send emails from the application is using the default generic setup. It is often better to setup outgoing emails to use the email server of your Email Service Provider instead of the default setup for several reasons:
|
||||
WarningPHPMailA=- Using the server of the Email Service Provider increase the trustability of your email, so it increase the deliverablity without being flagging as SPAM
|
||||
WarningPHPMailA=- Using the server of the Email Service Provider increases the trustability of your email, so it increases the deliverablity without being flagged as SPAM
|
||||
WarningPHPMailB=- Some Email Service Providers (like Yahoo) do not allow you to send an email from another server than their own server. Your current setup uses the server of the application to send email and not the server of your email provider, so some recipients (the one compatible with the restrictive DMARC protocol), will ask your email provider if they can accept your email and some email providers (like Yahoo) may respond "no" because the server is not theirs, so few of your sent Emails may not be accepted for delivery (be careful also of your email provider's sending quota).
|
||||
WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to send emails is also interesting so all emails sent from application will also be saved into your "Sent" directory of your mailbox.
|
||||
WarningPHPMailD=If the method 'PHP Mail' is really the method you would like to use, you can remove this warning by adding the constant MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP to 1 in Home - Setup - Other.
|
||||
|
||||
@ -163,9 +163,9 @@ AdvTgtCreateFilter=Create filter
|
||||
AdvTgtOrCreateNewFilter=Name of new filter
|
||||
NoContactWithCategoryFound=No contact/address with a category found
|
||||
NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found
|
||||
OutGoingEmailSetup=Outgoing email setup
|
||||
InGoingEmailSetup=Incoming email setup
|
||||
OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s)
|
||||
OutGoingEmailSetup=Outgoing emails
|
||||
InGoingEmailSetup=Incoming emails
|
||||
OutGoingEmailSetupForEmailing=Outgoing emails (for module %s)
|
||||
DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup
|
||||
Information=Information
|
||||
ContactsWithThirdpartyFilter=Contacts with third-party filter
|
||||
|
||||
Loading…
Reference in New Issue
Block a user