Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

This commit is contained in:
Laurent Destailleur 2022-10-06 15:39:10 +02:00
commit 8fdf4876d9
7 changed files with 18 additions and 16 deletions

View File

@ -1228,6 +1228,15 @@ class Contact extends CommonObject
$this->db->begin();
if (!$error && !$notrigger) {
// Call trigger
$result = $this->call_trigger('CONTACT_DELETE', $user);
if ($result < 0) {
$error++;
}
// End call triggers
}
if (!$error) {
// Get all rowid of element_contact linked to a type that is link to llx_socpeople
$sql = "SELECT ec.rowid";
@ -1318,15 +1327,6 @@ class Contact extends CommonObject
}
}
if (!$error && !$notrigger) {
// Call trigger
$result = $this->call_trigger('CONTACT_DELETE', $user);
if ($result < 0) {
$error++;
}
// End call triggers
}
if (!$error) {
$this->db->commit();
return 1;

View File

@ -28,9 +28,10 @@ if (!defined('NOREQUIREHTML')) {
if (!defined('NOREQUIREAJAX')) {
define('NOREQUIREAJAX', '1');
}
if (!defined('NOREQUIRESOC')) {
// Needed for create other object with workflow
/*if (!defined('NOREQUIRESOC')) {
define('NOREQUIRESOC', '1');
}
}*/
if (!defined('NOCSRFCHECK')) {
define('NOCSRFCHECK', '1');
}

View File

@ -6331,7 +6331,7 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer,
// Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
if (($seller_country_code == $buyer_country_code)
|| (in_array($seller_country_code, array('FR,MC')) && in_array($buyer_country_code, array('FR', 'MC')))) { // Warning ->country_code not always defined
|| (in_array($seller_country_code, array('FR', 'MC')) && in_array($buyer_country_code, array('FR', 'MC')))) { // Warning ->country_code not always defined
//print 'VATRULE 2';
return get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice);
}
@ -8614,7 +8614,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
}
} elseif ($onlysimplestring == '2') {
// We must accept: (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref : "Parent project not found"
if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/;[]', '/').']/i', $s)) {
if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/@;[]', '/').']/i', $s)) {
if ($returnvalue) {
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
} else {

View File

@ -1514,7 +1514,7 @@ class pdf_sponge extends ModelePDFFactures
// Total remise
$total_line_remise = 0;
foreach ($object->lines as $i => $line) {
$total_line_remise += pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, 2); // TODO: add this method to core/lib/pdf.lib
$total_line_remise += (float) pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, 2); // TODO: add this method to core/lib/pdf.lib
// Gestion remise sous forme de ligne négative
if ($line->total_ht < 0) {
$total_line_remise += -$line->total_ht;

View File

@ -482,7 +482,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pageposafter = $pageposbefore;
//print $pageposafter.'-'.$pageposbefore;exit;
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $descWidth, 3, $curX, $curY, $hideref, $hidedesc);
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $descWidth, 3, $curX, $curY, $hideref, $hidedesc, 1);
$pageposafter = $pdf->getPage();
$posyafter = $pdf->GetY();

View File

@ -1224,7 +1224,7 @@ if (empty($reshook)) {
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
$object->multicurrency_tx = price2num(GETPOST('originmulticurrency_tx', 'alpha'));
$object->fk_project = GETPOST('projectid', 'int');
// Fill array 'array_options' with data from add form

View File

@ -58,6 +58,7 @@ MainAccountForSuppliersNotDefined=Main accounting account for vendors not define
MainAccountForUsersNotDefined=Main accounting account for users not defined in setup
MainAccountForVatPaymentNotDefined=Main accounting account for VAT payment not defined in setup
MainAccountForSubscriptionPaymentNotDefined=Main accounting account for subscription payment not defined in setup
UserAccountNotDefined=Accounting account for user not defined in setup
AccountancyArea=Accounting area
AccountancyAreaDescIntro=Usage of the accountancy module is done in several step: