Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5c6d0bc26f
@ -209,6 +209,11 @@ with
|
|||||||
with
|
with
|
||||||
foreach ($value[1] as $k => $v) {
|
foreach ($value[1] as $k => $v) {
|
||||||
|
|
||||||
|
* Fix by replacing
|
||||||
|
if ($res[0] == PDF_TYPE_OBJECT)
|
||||||
|
with
|
||||||
|
if ($res && $res[0] == PDF_TYPE_OBJECT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JSGANTT:
|
JSGANTT:
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
|
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||||
* Copyright (C) 2016-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2016-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
|
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
|
||||||
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
|
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
|
||||||
@ -682,7 +682,7 @@ class AccountancyExport
|
|||||||
/**
|
/**
|
||||||
* Export format : Quadratus (Format ASCII)
|
* Export format : Quadratus (Format ASCII)
|
||||||
* Format since 2015 compatible QuadraCOMPTA
|
* Format since 2015 compatible QuadraCOMPTA
|
||||||
* Last review for this format : 2021/09/13 Alexandre Spangaro (aspangaro@open-dsi.fr)
|
* Last review for this format : 2023/01/28 Alexandre Spangaro (aspangaro@open-dsi.fr)
|
||||||
*
|
*
|
||||||
* Help : https://docplayer.fr/20769649-Fichier-d-entree-ascii-dans-quadracompta.html
|
* Help : https://docplayer.fr/20769649-Fichier-d-entree-ascii-dans-quadracompta.html
|
||||||
* In QuadraCompta | Use menu : "Outils" > "Suivi des dossiers" > "Import ASCII(Compta)"
|
* In QuadraCompta | Use menu : "Outils" > "Suivi des dossiers" > "Import ASCII(Compta)"
|
||||||
@ -703,6 +703,14 @@ class AccountancyExport
|
|||||||
// $date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
// $date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||||
// $date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
// $date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||||
foreach ($TData as $data) {
|
foreach ($TData as $data) {
|
||||||
|
// Clean some data
|
||||||
|
$data->doc_ref = dol_string_unaccent($data->doc_ref);
|
||||||
|
$data->label_operation = dol_string_unaccent($data->label_operation);
|
||||||
|
$data->numero_compte = dol_string_unaccent($data->numero_compte);
|
||||||
|
$data->label_compte = dol_string_unaccent($data->label_compte);
|
||||||
|
$data->subledger_account = dol_string_unaccent($data->subledger_account);
|
||||||
|
$data->subledger_label = dol_string_unaccent($data->subledger_label);
|
||||||
|
|
||||||
$code_compta = $data->numero_compte;
|
$code_compta = $data->numero_compte;
|
||||||
if (!empty($data->subledger_account)) {
|
if (!empty($data->subledger_account)) {
|
||||||
$code_compta = $data->subledger_account;
|
$code_compta = $data->subledger_account;
|
||||||
@ -734,9 +742,9 @@ class AccountancyExport
|
|||||||
if ($data->doc_type == 'customer_invoice') {
|
if ($data->doc_type == 'customer_invoice') {
|
||||||
$Tab['type_compte'] = 'C';
|
$Tab['type_compte'] = 'C';
|
||||||
} elseif ($data->doc_type == 'supplier_invoice') {
|
} elseif ($data->doc_type == 'supplier_invoice') {
|
||||||
$Tab['coll_compte'] = 'F';
|
$Tab['type_compte'] = 'F';
|
||||||
} else {
|
} else {
|
||||||
$Tab['coll_compte'] = 'G';
|
$Tab['type_compte'] = 'G';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Tab['filler3'] = str_repeat(' ', 235);
|
$Tab['filler3'] = str_repeat(' ', 235);
|
||||||
@ -761,7 +769,7 @@ class AccountancyExport
|
|||||||
//$Tab['date_ecriture'] = $date_ecriture;
|
//$Tab['date_ecriture'] = $date_ecriture;
|
||||||
$Tab['date_ecriture'] = dol_print_date($data->doc_date, '%d%m%y');
|
$Tab['date_ecriture'] = dol_print_date($data->doc_date, '%d%m%y');
|
||||||
$Tab['filler'] = ' ';
|
$Tab['filler'] = ' ';
|
||||||
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).' '.dol_string_unaccent($data->label_operation), 20), 20);
|
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref.' '.$data->label_operation, 20), 20);
|
||||||
|
|
||||||
// Credit invoice - invert sens
|
// Credit invoice - invert sens
|
||||||
/*
|
/*
|
||||||
@ -811,8 +819,8 @@ class AccountancyExport
|
|||||||
// TODO: we should filter more than only accent to avoid wrong line size
|
// TODO: we should filter more than only accent to avoid wrong line size
|
||||||
// TODO: remove invoice number doc_ref in libelle,
|
// TODO: remove invoice number doc_ref in libelle,
|
||||||
// TODO: we should offer an option for customer to build the libelle using invoice number / name / date in accounting software
|
// TODO: we should offer an option for customer to build the libelle using invoice number / name / date in accounting software
|
||||||
//$Tab['libelle_ecriture2'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref) . ' ' . dol_string_unaccent($data->label_operation), 30), 30);
|
//$Tab['libelle_ecriture2'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_operation, 30), 30);
|
||||||
$Tab['libelle_ecriture2'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 30), 30);
|
$Tab['libelle_ecriture2'] = str_pad(self::trunc($data->label_operation, 30), 30);
|
||||||
$Tab['codetva'] = str_repeat(' ', 2);
|
$Tab['codetva'] = str_repeat(' ', 2);
|
||||||
|
|
||||||
// We need to keep the 10 lastest number of invoice doc_ref not the beginning part that is the unusefull almost same part
|
// We need to keep the 10 lastest number of invoice doc_ref not the beginning part that is the unusefull almost same part
|
||||||
|
|||||||
@ -612,9 +612,6 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
mrpCollapseBomManagement();
|
|
||||||
|
|
||||||
|
|
||||||
//Services
|
//Services
|
||||||
$filtertype = 1;
|
$filtertype = 1;
|
||||||
$res = $object->fetchLinesbytypeproduct(1);
|
$res = $object->fetchLinesbytypeproduct(1);
|
||||||
|
|||||||
@ -171,7 +171,7 @@ $tmpbom->calculateCosts();
|
|||||||
print '<td id="costline_'.$line->id.'" class="linecolcost nowrap right">';
|
print '<td id="costline_'.$line->id.'" class="linecolcost nowrap right">';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
if (!empty($line->fk_bom_child)) {
|
if (!empty($line->fk_bom_child)) {
|
||||||
echo '<span class="amount">'.price($tmpbom->total_cost).'</span>';
|
echo '<span class="amount">'.price($tmpbom->total_cost * $line->qty).'</span>';
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="amount">'.price($line->total_cost).'</span>';
|
echo '<span class="amount">'.price($line->total_cost).'</span>';
|
||||||
}
|
}
|
||||||
@ -269,16 +269,20 @@ if ($resql) {
|
|||||||
$label = $sub_bom_product->getLabelOfUnit('long');
|
$label = $sub_bom_product->getLabelOfUnit('long');
|
||||||
if ($sub_bom_line->qty_frozen > 0) {
|
if ($sub_bom_line->qty_frozen > 0) {
|
||||||
print '<td class="linecolqty nowrap right" id="sub_bom_qty_'.$sub_bom_line->id.'">'.price($sub_bom_line->qty, 0, '', 0, 0).'</td>';
|
print '<td class="linecolqty nowrap right" id="sub_bom_qty_'.$sub_bom_line->id.'">'.price($sub_bom_line->qty, 0, '', 0, 0).'</td>';
|
||||||
|
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||||
print '<td class="linecoluseunit nowrap left">';
|
print '<td class="linecoluseunit nowrap left">';
|
||||||
if ($label !== '') print $langs->trans($label);
|
if ($label !== '') print $langs->trans($label);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
}
|
||||||
print '<td class="linecolqtyfrozen nowrap right" id="sub_bom_qty_frozen_'.$sub_bom_line->id.'">'.$langs->trans('Yes').'</td>';
|
print '<td class="linecolqtyfrozen nowrap right" id="sub_bom_qty_frozen_'.$sub_bom_line->id.'">'.$langs->trans('Yes').'</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="linecolqty nowrap right" id="sub_bom_qty_'.$sub_bom_line->id.'">'.price($sub_bom_line->qty * $line->qty, 0, '', 0, 0).'</td>';
|
print '<td class="linecolqty nowrap right" id="sub_bom_qty_'.$sub_bom_line->id.'">'.price($sub_bom_line->qty * $line->qty, 0, '', 0, 0).'</td>';
|
||||||
|
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||||
print '<td class="linecoluseunit nowrap left">';
|
print '<td class="linecoluseunit nowrap left">';
|
||||||
if ($label !== '') print $langs->trans($label);
|
if ($label !== '') print $langs->trans($label);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</td>';
|
}
|
||||||
|
|
||||||
print '<td class="linecolqtyfrozen nowrap right" id="sub_bom_qty_frozen_'.$sub_bom_line->id.'"> </td>';
|
print '<td class="linecolqtyfrozen nowrap right" id="sub_bom_qty_frozen_'.$sub_bom_line->id.'"> </td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -705,7 +705,7 @@ class DoliDBMysqli extends DoliDB
|
|||||||
}
|
}
|
||||||
$tmpdatabase = preg_replace('/[^a-z0-9\.\-\_]/i', '', $database);
|
$tmpdatabase = preg_replace('/[^a-z0-9\.\-\_]/i', '', $database);
|
||||||
|
|
||||||
$sql = "SHOW TABLES FROM ".$tmpdatabase." ".$like.";";
|
$sql = "SHOW TABLES FROM `".$tmpdatabase."` ".$like.";";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
$result = $this->query($sql);
|
$result = $this->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
|||||||
@ -170,7 +170,16 @@ function getValidOnlinePaymentMethods($paymentmethod = '')
|
|||||||
'validpaymentmethod' => &$validpaymentmethod
|
'validpaymentmethod' => &$validpaymentmethod
|
||||||
];
|
];
|
||||||
$tmpobject = new stdClass();
|
$tmpobject = new stdClass();
|
||||||
$hookmanager->executeHooks('doValidatePayment', $parameters, $tmpobject, $action);
|
$reshook = $hookmanager->executeHooks('getValidPayment', $parameters, $tmpobject, $action);
|
||||||
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
} elseif (!empty($hookmanager->resArray['validpaymentmethod'])) {
|
||||||
|
if ($reshook == 0) {
|
||||||
|
$validpaymentmethod = array_merge($validpaymentmethod, $hookmanager->resArray['validpaymentmethod']);
|
||||||
|
} else {
|
||||||
|
$validpaymentmethod = $hookmanager->resArray['validpaymentmethod'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $validpaymentmethod;
|
return $validpaymentmethod;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1729,7 +1729,10 @@ function get_left_menu_accountancy($mainmenu, &$newmenu, $usemenuhider = 1, $lef
|
|||||||
|
|
||||||
if ($nature) {
|
if ($nature) {
|
||||||
$langs->load('accountancy');
|
$langs->load('accountancy');
|
||||||
$journallabel = $langs->transnoentities($objp->label); // Label of bank account in llx_accounting_journal
|
$journallabel = '';
|
||||||
|
if ($objp->label) {
|
||||||
|
$journallabel = '<span class="opacitymedium">('.$langs->transnoentities($objp->label).')</span>'; // Label of bank account in llx_accounting_journal
|
||||||
|
}
|
||||||
|
|
||||||
$key = $langs->trans("AccountingJournalType".strtoupper($objp->nature));
|
$key = $langs->trans("AccountingJournalType".strtoupper($objp->nature));
|
||||||
$transferlabel = ($objp->nature && $key != "AccountingJournalType".strtoupper($langs->trans($objp->nature)) ? $key.($journallabel != $key ? ' '.$journallabel : ''): $journallabel);
|
$transferlabel = ($objp->nature && $key != "AccountingJournalType".strtoupper($langs->trans($objp->nature)) ? $key.($journallabel != $key ? ' '.$journallabel : ''): $journallabel);
|
||||||
|
|||||||
@ -128,8 +128,7 @@ class mod_task_universal extends ModeleNumRefTask
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// On defini critere recherche compteur
|
$mask = !empty($conf->global->PROJECT_TASK_UNIVERSAL_MASK) ? $conf->global->PROJECT_TASK_UNIVERSAL_MASK : '';
|
||||||
$mask = $conf->global->PROJECT_TASK_UNIVERSAL_MASK;
|
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -82,7 +82,7 @@ ProductsToConsume=Produits à consommer
|
|||||||
ProductsToProduce=Produits à produire
|
ProductsToProduce=Produits à produire
|
||||||
UnitCost=Coût unitaire
|
UnitCost=Coût unitaire
|
||||||
TotalCost=Coût total
|
TotalCost=Coût total
|
||||||
BOMTotalCost=Le coût de production de cette nomenclature basé sur chaque quantité et produit à consommer (utilise le cout de la sous BOM si existante, sinon le prix de revient du produit si défini, sinon le PMP si défini, sinon le meilleur prix d'achat)
|
BOMTotalCost=Le coût de production de cette nomenclature basé sur chaque quantité et produit à consommer (utilise <b>le cout de la sous BOM si existante, sinon le prix de revient du produit si défini, sinon le PMP si défini, sinon le meilleur prix d'achat</b>)
|
||||||
BOMTotalCostService=Si le module "Poste de travail" est activé et qu'un poste de travail est défini par défaut sur la ligne, alors le calcul est "quantité (convertie en heures) x poste de travail ahr", sinon "quantité (convertie en heures) x prix de revient du service"
|
BOMTotalCostService=Si le module "Poste de travail" est activé et qu'un poste de travail est défini par défaut sur la ligne, alors le calcul est "quantité (convertie en heures) x poste de travail ahr", sinon "quantité (convertie en heures) x prix de revient du service"
|
||||||
GoOnTabProductionToProduceFirst=Vous devez avoir la production pour clôturer un Ordre de Fabrication (voir onglet '%s'). Mais vous pouvez l'annuler.
|
GoOnTabProductionToProduceFirst=Vous devez avoir la production pour clôturer un Ordre de Fabrication (voir onglet '%s'). Mais vous pouvez l'annuler.
|
||||||
ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit ne peut pas être utilisé dans une Nomenclature ou un Ordre de fabrication.
|
ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit ne peut pas être utilisé dans une Nomenclature ou un Ordre de fabrication.
|
||||||
|
|||||||
@ -812,6 +812,19 @@ if ($action == 'charge' && isModEnabled('stripe')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This hook is used to push to $validpaymentmethod by external payment modules (ie Payzen, ...)
|
||||||
|
$parameters = array(
|
||||||
|
'paymentmethod' => $paymentmethod,
|
||||||
|
'validpaymentmethod' => &$validpaymentmethod
|
||||||
|
);
|
||||||
|
$reshook = $hookmanager->executeHooks('doPayment', $parameters, $object, $action);
|
||||||
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
} elseif ($reshook > 0) {
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -2022,6 +2035,12 @@ if ($action != 'dopayment') {
|
|||||||
'object' => $object
|
'object' => $object
|
||||||
];
|
];
|
||||||
$reshook = $hookmanager->executeHooks('doCheckStatus', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('doCheckStatus', $parameters, $object, $action);
|
||||||
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
} elseif ($reshook > 0) {
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
|
||||||
if ($source == 'order' && $object->billed) {
|
if ($source == 'order' && $object->billed) {
|
||||||
print '<br><br><span class="amountpaymentcomplete size15x">'.$langs->trans("OrderBilled").'</span>';
|
print '<br><br><span class="amountpaymentcomplete size15x">'.$langs->trans("OrderBilled").'</span>';
|
||||||
} elseif ($source == 'invoice' && $object->paye) {
|
} elseif ($source == 'invoice' && $object->paye) {
|
||||||
@ -2043,6 +2062,12 @@ if ($action != 'dopayment') {
|
|||||||
'paymentmethod' => $paymentmethod
|
'paymentmethod' => $paymentmethod
|
||||||
];
|
];
|
||||||
$reshook = $hookmanager->executeHooks('doAddButton', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('doAddButton', $parameters, $object, $action);
|
||||||
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
} elseif ($reshook > 0) {
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
|
||||||
if ((empty($paymentmethod) || $paymentmethod == 'paybox') && isModEnabled('paybox')) {
|
if ((empty($paymentmethod) || $paymentmethod == 'paybox') && isModEnabled('paybox')) {
|
||||||
print '<div class="button buttonpayment" id="div_dopayment_paybox"><span class="fa fa-credit-card"></span> <input class="" type="submit" id="dopayment_paybox" name="dopayment_paybox" value="'.$langs->trans("PayBoxDoPayment").'">';
|
print '<div class="button buttonpayment" id="div_dopayment_paybox"><span class="fa fa-credit-card"></span> <input class="" type="submit" id="dopayment_paybox" name="dopayment_paybox" value="'.$langs->trans("PayBoxDoPayment").'">';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -2646,8 +2671,12 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme
|
|||||||
'dopayment' => GETPOST('dopayment', 'alpha')
|
'dopayment' => GETPOST('dopayment', 'alpha')
|
||||||
];
|
];
|
||||||
$reshook = $hookmanager->executeHooks('doPayment', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('doPayment', $parameters, $object, $action);
|
||||||
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
} elseif ($reshook > 0) {
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object);
|
htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user