Merge remote-tracking branch 'upstream/develop' into 15a29
This commit is contained in:
commit
1cd864e395
@ -314,7 +314,7 @@ if (!empty($search_categ) || !empty($catid)) {
|
||||
}
|
||||
$sql .= " d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
|
||||
$sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
|
||||
$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,";
|
||||
$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
|
||||
$sql .= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
|
||||
$sql .= " d.note_private, d.note_public,";
|
||||
$sql .= " s.nom,";
|
||||
|
||||
@ -275,8 +275,7 @@ print '<br><br>';
|
||||
/*
|
||||
* Document templates generators
|
||||
*/
|
||||
//if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
//{
|
||||
|
||||
print load_fiche_titre($langs->trans("BankAccountModelModule"), '', '');
|
||||
|
||||
// Load array def with activated templates
|
||||
@ -466,8 +465,7 @@ print '<br><br>';
|
||||
/*
|
||||
* Document templates generators
|
||||
*/
|
||||
//if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
//{
|
||||
|
||||
print load_fiche_titre($langs->trans("Other"), '', '');
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
|
||||
@ -542,7 +542,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
||||
$moreforfilter .= $form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), $langs->trans('Origin'), 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1);
|
||||
$moreforfilter .= '</div>';
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) {
|
||||
$array_version = array('stable'=>$langs->transnoentitiesnoconv("Stable"));
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL < 0) {
|
||||
$array_version['deprecated'] = $langs->trans("Deprecated");
|
||||
|
||||
@ -297,7 +297,7 @@ foreach ($dirmodels as $reldir)
|
||||
$module = new $classname($db);
|
||||
|
||||
$modulequalified=1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
|
||||
|
||||
if ($modulequalified) {
|
||||
|
||||
@ -187,8 +187,6 @@ if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY) && $user->entity) {
|
||||
}
|
||||
|
||||
|
||||
//print "conf->global->MAIN_FEATURES_LEVEL = ".$conf->global->MAIN_FEATURES_LEVEL."<br><br>\n";
|
||||
|
||||
// Output mode
|
||||
print load_fiche_titre($langs->trans("SyslogOutput"), '', '');
|
||||
|
||||
@ -207,7 +205,7 @@ foreach ($syslogModules as $moduleName) {
|
||||
|
||||
$moduleactive = (int) $module->isActive();
|
||||
//print $moduleName." = ".$moduleactive." - ".$module->getName()." ".($moduleactive == -1)."<br>\n";
|
||||
if (($moduleactive == -1) && empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
if (($moduleactive == -1) && getDolGlobalInt('MAIN_FEATURES_LEVEL') == 0) {
|
||||
continue; // Some modules are hidden if not activable and not into debug mode (end user must not see them)
|
||||
}
|
||||
|
||||
|
||||
@ -556,7 +556,7 @@ if ($mode == 'searchkey') {
|
||||
print '<a class="reposition paddingrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=overwrite&langcode='.urlencode($langcode).'&transkey='.urlencode($key).'">'.img_edit_add($langs->trans("TranslationOverwriteKey")).'</a>';
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) {
|
||||
$transifexlangfile = '$'; // $ means 'All'
|
||||
//$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key;
|
||||
$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key;
|
||||
|
||||
@ -2679,7 +2679,7 @@ if ($action == 'create') {
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList);
|
||||
|
||||
// Show online signature link
|
||||
$useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok
|
||||
$useonlinesignature = 1; // Replace this with 1 when feature to make online signature is ok
|
||||
|
||||
if ($object->statut != Propal::STATUS_DRAFT && $useonlinesignature) {
|
||||
print '<br><!-- Link to sign -->';
|
||||
|
||||
@ -1345,10 +1345,25 @@ if ($resql) {
|
||||
print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$param", '', $sortfield, $sortorder);
|
||||
}
|
||||
|
||||
$totalarray = array(
|
||||
'nbfield' => 0,
|
||||
'val' => array(
|
||||
'c.total_ht' => 0,
|
||||
'c.total_tva' => 0,
|
||||
'c.total_ttc' => 0,
|
||||
),
|
||||
'pos' => array(),
|
||||
);
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
||||
$parameters = array(
|
||||
'arrayfields' => $arrayfields,
|
||||
'param' => $param,
|
||||
'sortfield' => $sortfield,
|
||||
'sortorder' => $sortorder,
|
||||
'totalarray' => &$totalarray,
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (!empty($arrayfields['c.datec']['checked'])) {
|
||||
@ -1388,7 +1403,6 @@ if ($resql) {
|
||||
$generic_product = new Product($db);
|
||||
$userstatic = new User($db);
|
||||
$i = 0;
|
||||
$totalarray = array('nbfield' => 0, 'val' => array(), 'pos' => array());
|
||||
while ($i < min($num, $limit)) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
@ -4091,10 +4091,10 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Confirmation du classement paye
|
||||
if ($action == 'paid' && $resteapayer <= 0) {
|
||||
if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $resteapayer == $object->total_ttc))) {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1);
|
||||
}
|
||||
if ($action == 'paid' && $resteapayer > 0) {
|
||||
if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc)) {
|
||||
$close = array();
|
||||
// Code
|
||||
$i = 0;
|
||||
@ -5450,14 +5450,17 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Classify paid
|
||||
if (($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0)))
|
||||
|| ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id))
|
||||
if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $usercanissuepayment && (
|
||||
($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) ||
|
||||
($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0) ||
|
||||
($object->type == Facture::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer)))
|
||||
)
|
||||
) {
|
||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaid').'</a>';
|
||||
}
|
||||
|
||||
// Classify 'closed not completely paid' (possible if validated and not yet filed paid)
|
||||
if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && $usercanissuepayment) {
|
||||
if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc) && $usercanissuepayment) {
|
||||
if ($totalpaye > 0 || $totalcreditnotes > 0) {
|
||||
// If one payment or one credit note was linked to this invoice
|
||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaidPartially').'</a>';
|
||||
|
||||
@ -110,7 +110,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
|
||||
}
|
||||
|
||||
// Validation of fields values
|
||||
if ($conf->global->MAIN_FEATURE_LEVEL >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) {
|
||||
if (!$error && !empty($val['validate']) && is_callable(array($object, 'validateField'))) {
|
||||
if (!$object->validateField($object->fields, $key, $value)) {
|
||||
$error++;
|
||||
@ -226,7 +226,7 @@ if ($action == 'update' && !empty($permissiontoadd)) {
|
||||
}
|
||||
|
||||
// Validation of fields values
|
||||
if ($conf->global->MAIN_FEATURE_LEVEL >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 || !empty($conf->global->MAIN_ACTIVATE_VALIDATION_RESULT)) {
|
||||
if (!$error && !empty($val['validate']) && is_callable(array($object, 'validateField'))) {
|
||||
if (!$object->validateField($object->fields, $key, $value)) {
|
||||
$error++;
|
||||
|
||||
@ -229,7 +229,8 @@ class HookManager
|
||||
'showLinkToObjectBlock',
|
||||
'setContentSecurityPolicy',
|
||||
'setHtmlTitle',
|
||||
'completeTabsHead'
|
||||
'completeTabsHead',
|
||||
'formDolBanner'
|
||||
)
|
||||
)) {
|
||||
$hooktype = 'addreplace';
|
||||
|
||||
@ -304,7 +304,7 @@ class FormAdmin
|
||||
if (preg_match('/\.lib/i', $filelib)) {
|
||||
continue;
|
||||
}
|
||||
if (empty($conf->global->MAIN_FEATURES_LEVEL) && in_array($file, $expdevmenu)) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') == 0 && in_array($file, $expdevmenu)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -1373,7 +1373,7 @@ class FormFile
|
||||
}
|
||||
// Preview link
|
||||
if (!$editline) {
|
||||
print $this->showPreview($file, $modulepart, $filepath, 0, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity));
|
||||
print $this->showPreview($file, $modulepart, $filepath, 0, 'entity='.(!empty($object->entity) ? $object->entity : $conf->entity));
|
||||
}
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
@ -37,7 +37,7 @@ class InfoBox
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (empty($conf->global->MAIN_FEATURES_LEVEL) || $conf->global->MAIN_FEATURES_LEVEL < 2) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
return array(
|
||||
0 => 'Home',
|
||||
1 => 'UsersHome',
|
||||
|
||||
@ -589,7 +589,7 @@ class Translate
|
||||
}
|
||||
|
||||
/* Disabled. There is too many cases where translation of $newstr is not defined is normal (like when output with setEventMessage an already translated string)
|
||||
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2)
|
||||
{
|
||||
dol_syslog(__METHOD__." MAIN_FEATURES_LEVEL=DEVELOP: missing translation for key '".$newstr."' in ".$_SERVER["PHP_SELF"], LOG_DEBUG);
|
||||
}*/
|
||||
|
||||
@ -83,8 +83,8 @@ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
|
||||
$appli .= " ".DOL_VERSION;
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
$appli .= "<br>".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL;
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) {
|
||||
$appli .= "<br>".$langs->trans("LevelOfFeature").': '.getDolGlobalInt('MAIN_FEATURES_LEVEL');
|
||||
}
|
||||
|
||||
$logouttext = '';
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -66,7 +67,7 @@ function bank_prepare_head(Account $object)
|
||||
$head[$h][2] = 'graph';
|
||||
$h++;
|
||||
|
||||
if ($object->courant != Account::TYPE_CASH) {
|
||||
if ($object->courant != Account::TYPE_CASH || !empty($conf->global->BANK_CAN_RECONCILIATE_CASHACCOUNT)) {
|
||||
$nbReceipts = 0;
|
||||
|
||||
// List of all standing receipts
|
||||
|
||||
@ -1845,7 +1845,7 @@ function dol_get_fiche_end($notab = 0)
|
||||
*/
|
||||
function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $onlybanner = 0, $morehtmlright = '')
|
||||
{
|
||||
global $conf, $form, $user, $langs;
|
||||
global $conf, $form, $user, $langs, $hookmanager;
|
||||
|
||||
$error = 0;
|
||||
|
||||
@ -2116,6 +2116,17 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
||||
$morehtmlref .= '</div>';
|
||||
}
|
||||
|
||||
$parameters=array('morehtmlref'=>$morehtmlref);
|
||||
$reshook = $hookmanager->executeHooks('formDolBanner', $parameters, $object, $action);
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
} elseif (empty($reshook)) {
|
||||
$morehtmlref .= $hookmanager->resPrint;
|
||||
} elseif ($reshook > 0) {
|
||||
$morehtmlref = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
|
||||
print '<div class="'.($onlybanner ? 'arearefnobottom ' : 'arearef ').'heightref valignmiddle centpercent">';
|
||||
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
|
||||
print '</div>';
|
||||
@ -4526,7 +4537,7 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
|
||||
if ($_SERVER['DOCUMENT_ROOT']) { // Mode web
|
||||
$out .= $langs->trans("DolibarrHasDetectedError").".<br>\n";
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') > 0) {
|
||||
$out .= "You use an experimental or develop level of features, so please do NOT report any bugs or vulnerability, except if problem is confirmed after moving option MAIN_FEATURES_LEVEL back to 0.<br>\n";
|
||||
}
|
||||
$out .= $langs->trans("InformationToHelpDiagnose").":<br>\n";
|
||||
@ -4534,7 +4545,7 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
$out .= "<b>".$langs->trans("Date").":</b> ".dol_print_date(time(), 'dayhourlog')."<br>\n";
|
||||
$out .= "<b>".$langs->trans("Dolibarr").":</b> ".DOL_VERSION." - https://www.dolibarr.org<br>\n";
|
||||
if (isset($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
$out .= "<b>".$langs->trans("LevelOfFeature").":</b> ".dol_htmlentities($conf->global->MAIN_FEATURES_LEVEL, ENT_COMPAT)."<br>\n";
|
||||
$out .= "<b>".$langs->trans("LevelOfFeature").":</b> ".getDolGlobalInt('MAIN_FEATURES_LEVEL')."<br>\n";
|
||||
}
|
||||
if (function_exists("phpversion")) {
|
||||
$out .= "<b>".$langs->trans("PHP").":</b> ".phpversion()."<br>\n";
|
||||
|
||||
@ -471,14 +471,6 @@ function project_timesheet_prepare_head($mode, $fuser = null)
|
||||
$h++;
|
||||
}
|
||||
|
||||
/*if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/projet/activity/perline.php".($param?'?'.$param:'');
|
||||
$head[$h][1] = $langs->trans("InputDetail");
|
||||
$head[$h][2] = 'inputperline';
|
||||
$h++;
|
||||
}*/
|
||||
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'project_timesheet');
|
||||
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'project_timesheet', 'remove');
|
||||
@ -517,7 +509,7 @@ function project_admin_prepare_head()
|
||||
$head[$h][2] = 'attributes_task';
|
||||
$h++;
|
||||
|
||||
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
$langs->load("members");
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/admin/website.php';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2014-2020 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2014-2021 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -108,10 +108,10 @@ class printing_printipp extends PrintingDriver
|
||||
global $conf;
|
||||
|
||||
$this->db = $db;
|
||||
$this->host = $conf->global->PRINTIPP_HOST;
|
||||
$this->port = $conf->global->PRINTIPP_PORT;
|
||||
$this->user = $conf->global->PRINTIPP_USER;
|
||||
$this->password = $conf->global->PRINTIPP_PASSWORD;
|
||||
$this->host = getDolGlobalString('PRINTIPP_HOST');
|
||||
$this->port = getDolGlobalString('PRINTIPP_PORT');
|
||||
$this->user = getDolGlobalString('PRINTIPP_USER');
|
||||
$this->password = getDolGlobalString('PRINTIPP_PASSWORD');
|
||||
$this->conf[] = array('varname'=>'PRINTIPP_HOST', 'required'=>1, 'example'=>'localhost', 'type'=>'text');
|
||||
$this->conf[] = array('varname'=>'PRINTIPP_PORT', 'required'=>1, 'example'=>'631', 'type'=>'text');
|
||||
$this->conf[] = array('varname'=>'PRINTIPP_USER', 'required'=>0, 'example'=>'', 'type'=>'text', 'moreattributes'=>'autocomplete="off"');
|
||||
@ -159,8 +159,8 @@ class printing_printipp extends PrintingDriver
|
||||
$ipp->setCopies($obj->copy);
|
||||
} else {
|
||||
if (!empty($conf->global->PRINTIPP_URI_DEFAULT)) {
|
||||
dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".$conf->global->PRINTIPP_URI_DEFAULT);
|
||||
$ipp->setPrinterURI($conf->global->PRINTIPP_URI_DEFAULT);
|
||||
dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".getDolGlobalString('PRINTIPP_URI_DEFAULT'));
|
||||
$ipp->setPrinterURI(getDolGlobalString('PRINTIPP_URI_DEFAULT'));
|
||||
} else {
|
||||
$this->errors[] = 'NoDefaultPrinterDefined';
|
||||
$error++;
|
||||
|
||||
@ -104,7 +104,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '</tr>';
|
||||
|
||||
if ($conf->global->MAIN_FEATURE_LEVEL >= 2) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
// Parametrage du prefix des replacement
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
@ -118,6 +118,7 @@ $permissiontoadd = $user->rights->expensereport->creer; // Used by the include o
|
||||
$upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
|
||||
$projectRequired = $conf->projet->enabled && ! empty($conf->global->EXPENSEREPORT_PROJECT_IS_REQUIRED);
|
||||
$fileRequired = !empty($conf->global->EXPENSEREPORT_FILE_IS_REQUIRED);
|
||||
|
||||
if ($object->id > 0) {
|
||||
// Check current user can read this expense report
|
||||
@ -1157,6 +1158,12 @@ if (empty($reshook)) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Project")), null, 'errors');
|
||||
}
|
||||
|
||||
// If no file associated
|
||||
if ($fileRequired && $fk_ecm_files == 0) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors');
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$type = 0; // TODO What if service ? We should take the type product/service from the type of expense report llx_c_type_fees
|
||||
|
||||
|
||||
@ -151,7 +151,6 @@ $sqlusedforexport = '';
|
||||
$head = array();
|
||||
$upload_dir = $conf->export->dir_temp.'/'.$user->id;
|
||||
|
||||
//$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1);
|
||||
$usefilters = 1;
|
||||
|
||||
// Security check
|
||||
|
||||
23
htdocs/fourn/facture/card.php
Normal file → Executable file
23
htdocs/fourn/facture/card.php
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?phpf
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
@ -2563,11 +2563,11 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Confirmation set paid
|
||||
if ($action == 'paid' && $resteapayer <= 0) {
|
||||
if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $resteapayer == $object->total_ttc))) {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
||||
}
|
||||
|
||||
if ($action == 'paid' && $resteapayer > 0) {
|
||||
if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc)) {
|
||||
$close = array();
|
||||
// Code
|
||||
$i = 0;
|
||||
@ -2721,8 +2721,12 @@ if ($action == 'create') {
|
||||
}
|
||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||
$facusing = new FactureFournisseur($db);
|
||||
$facusing->fetch($object->fk_facture_source);
|
||||
print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')';
|
||||
if ($object->fk_facture_source > 0) {
|
||||
$facusing->fetch($object->fk_facture_source);
|
||||
print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')';
|
||||
} else {
|
||||
print ' ('.$langs->transnoentities("CorrectedInvoiceNotFound").')';
|
||||
}
|
||||
}
|
||||
|
||||
$facidavoir = $object->getListIdAvoirFromInvoice();
|
||||
@ -3496,14 +3500,17 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Classify paid
|
||||
if (($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && (($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $resteapayer >= 0)))
|
||||
|| ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && empty($discount->id))
|
||||
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && (
|
||||
($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) ||
|
||||
($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $resteapayer >= 0) ||
|
||||
($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer)))
|
||||
)
|
||||
) {
|
||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaid').'</a>';
|
||||
}
|
||||
|
||||
// Classify 'closed not completely paid' (possible if validated and not yet filed paid)
|
||||
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0) {
|
||||
if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $object->total_ttc != $resteapayer)) {
|
||||
if ($totalpaye > 0 || $totalcreditnotes > 0) {
|
||||
// If one payment or one credit note was linked to this invoice
|
||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=paid">'.$langs->trans('ClassifyPaidPartially').'</a>';
|
||||
|
||||
@ -349,7 +349,7 @@ if ($object->id) {
|
||||
$permissiontoadd = $user->rights->holiday->write;
|
||||
$permtoedit = $user->rights->holiday->write;
|
||||
$param = '&id='.$object->id;
|
||||
$relativepathwithnofile = $modulepart.'/'.dol_sanitizeFileName($object->ref).'/';
|
||||
$relativepathwithnofile = dol_sanitizeFileName($object->ref).'/';
|
||||
$savingdocmask = dol_sanitizeFileName($object->ref).'-__file__';
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -111,7 +111,7 @@ class Evaluationline extends CommonObject
|
||||
'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
|
||||
'fk_skill' => array('type'=>'integer:Skill:hrm/class/skill.class.php:1', 'label'=>'Skill', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
|
||||
'fk_evaluation' => array('type'=>'integer:Evaluation:hrm/class/evaluation.class.php:1', 'label'=>'Evaluation', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
|
||||
'rank' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>1,),
|
||||
'rankorder' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>1,),
|
||||
'required_rank' => array('type'=>'integer', 'label'=>'requiredRank', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>1,),
|
||||
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
|
||||
);
|
||||
|
||||
@ -104,7 +104,7 @@ class Skilldet extends CommonObject
|
||||
*/
|
||||
public $fields=array(
|
||||
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||
'rank' => array('type'=>'integer', 'label'=>'rank', 'enabled'=>'1', 'position'=>2, 'notnull'=>0, 'visible'=>2,),
|
||||
'rankorder' => array('type'=>'integer', 'label'=>'rank', 'enabled'=>'1', 'position'=>2, 'notnull'=>0, 'visible'=>2,),
|
||||
'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,),
|
||||
'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
|
||||
'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>0,),
|
||||
|
||||
21
htdocs/install/mysql/tables/llx_element_tag.key.sql
Normal file
21
htdocs/install/mysql/tables/llx_element_tag.key.sql
Normal file
@ -0,0 +1,21 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2021 Maxime Kohlhaas <support@atm-consulting.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
ALTER TABLE llx_element_tag ADD UNIQUE INDEX idx_element_tag_uk (fk_categorie, fk_element);
|
||||
|
||||
ALTER TABLE llx_element_tag ADD CONSTRAINT fk_element_tag_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
25
htdocs/install/mysql/tables/llx_element_tag.sql
Normal file
25
htdocs/install/mysql/tables/llx_element_tag.sql
Normal file
@ -0,0 +1,25 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2021 Maxime Kohlhaas <support@atm-consulting.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_element_tag
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_element integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
@ -523,7 +523,6 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt(
|
||||
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (invalid token), so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING);
|
||||
//print 'Unset POST by CSRF protection in main.inc.php.'; // Do not output anything because this create problems when using the BACK button on browsers.
|
||||
setEventMessages('SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry', null, 'warnings');
|
||||
//if ($conf->global->MAIN_FEATURES_LEVEL >= 1) setEventMessages('Unset POST and GET params by CSRF protection in main.inc.php (Token provided was not generated by the previous page).'."<br>\n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings');
|
||||
if (isset($_POST['id'])) $savid = ((int) $_POST['id']);
|
||||
unset($_POST);
|
||||
//unset($_POST['action']); unset($_POST['massaction']);
|
||||
@ -1437,8 +1436,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
||||
print '<meta name="robots" content="noindex'.($disablenofollow ? '' : ',nofollow').'">'."\n"; // Do not index
|
||||
print '<meta name="viewport" content="width=device-width, initial-scale=1.0">'."\n"; // Scale for mobile device
|
||||
print '<meta name="author" content="Dolibarr Development Team">'."\n";
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
print '<meta name="MAIN_FEATURES_LEVEL" content="'.$conf->global->MAIN_FEATURES_LEVEL.'">'."\n";
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) {
|
||||
print '<meta name="MAIN_FEATURES_LEVEL" content="'.getDolGlobalInt('MAIN_FEATURES_LEVEL').'">'."\n";
|
||||
}
|
||||
// Favicon
|
||||
$favicon = DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png';
|
||||
@ -1628,11 +1627,6 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
||||
} else {
|
||||
print '<script src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
}
|
||||
/*if (! empty($conf->global->MAIN_FEATURES_LEVEL) && ! defined('JS_JQUERY_MIGRATE_DISABLED'))
|
||||
{
|
||||
if (defined('JS_JQUERY_MIGRATE') && constant('JS_JQUERY_MIGRATE')) print '<script src="'.JS_JQUERY_MIGRATE.'jquery-migrate.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||
else print '<script src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-migrate.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||
}*/
|
||||
if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) {
|
||||
print '<script src="'.JS_JQUERY_UI.'jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
} else {
|
||||
@ -1842,8 +1836,8 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
||||
$appli .= " ".DOL_VERSION;
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) {
|
||||
$appli .= "<br>".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL;
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) {
|
||||
$appli .= "<br>".$langs->trans("LevelOfFeature").': '.getDolGlobalInt('MAIN_FEATURES_LEVEL');
|
||||
}
|
||||
|
||||
$logouttext = '';
|
||||
|
||||
@ -833,7 +833,7 @@ print '</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { // Visible on experimental only because seems to not be implemented everywhere (only on proposal)
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') > 0) { // Visible on experimental only because seems to not be implemented everywhere (only on proposal)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="80%">'.$langs->trans("AskForPreferredShippingMethod").'</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
@ -850,7 +850,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && $conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
$stripesupplieracc = $stripe->getStripeAccount($service, $object->id); // Get Stripe OAuth connect account (no network access here)
|
||||
|
||||
// Stripe customer key 'cu_....' stored into llx_societe_account
|
||||
|
||||
@ -356,7 +356,7 @@ print img_picto('', 'bank_account').' ';
|
||||
$form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // What is this for ?
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // What is this for ?
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BankAccountForBankTransfer").'</td><td>';
|
||||
print img_picto('', 'bank_account').' ';
|
||||
@ -446,15 +446,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Warehouse for automatic decrement
|
||||
//if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // warehouse to reduce stock for online payment
|
||||
//{
|
||||
// print '<tr class="oddeven"><td>';
|
||||
// print $langs->trans("ONLINE_PAYMENT_WAREHOUSE").'</td><td>';
|
||||
// print $formproduct->selectWarehouses($conf->global->ONLINE_PAYMENT_WAREHOUSE, 'ONLINE_PAYMENT_WAREHOUSE', '', 1, $disabled);
|
||||
// print '</td></tr>';
|
||||
//}
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("CSSUrlForPaymentForm").'</td><td>';
|
||||
print '<input size="64" type="text" name="ONLINE_PAYMENT_CSS_URL" value="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'">';
|
||||
|
||||
@ -53,7 +53,7 @@ div.mainmenu.bank::before {
|
||||
content: "\f19c";
|
||||
}
|
||||
|
||||
<?php if ($conf->global->MAIN_FEATURES_LEVEL == 2) { ?>
|
||||
<?php if (getDolGlobalInt('MAIN_FEATURES_LEVEL') == 2) { ?>
|
||||
/* TESTING USAGE OF SVG WITHOUT FONT */
|
||||
div.mainmenu.cashdesk {
|
||||
line-height: 26px;
|
||||
|
||||
@ -1932,7 +1932,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
||||
$exclude = array();
|
||||
|
||||
$usergroup = new UserGroup($db);
|
||||
$groupslist = $usergroup->listGroupsForUser($object->id);
|
||||
$groupslist = $usergroup->listGroupsForUser($object->id, false);
|
||||
|
||||
if (!empty($groupslist)) {
|
||||
foreach ($groupslist as $groupforuser) {
|
||||
|
||||
@ -488,7 +488,13 @@ class ProductCombination
|
||||
|
||||
$child->price_autogen = $parent->price_autogen;
|
||||
$child->weight = $parent->weight;
|
||||
$child->status = $parent->status;
|
||||
// Only when Parent Status are updated
|
||||
if ($parent->oldcopy && ($parent->status != $parent->oldcopy->status)) {
|
||||
$child->status = $parent->status;
|
||||
}
|
||||
if ($parent->oldcopy && ($parent->status_buy != $parent->oldcopy->status_buy)) {
|
||||
$child->status_buy = $parent->status_buy;
|
||||
}
|
||||
|
||||
if ($this->variation_weight) { // If we must add a delta on weight
|
||||
$child->weight = ($child->weight ? $child->weight : 0) + $this->variation_weight;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user