Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
8fdf4876d9
@ -1228,6 +1228,15 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
if (!$error && !$notrigger) {
|
||||||
|
// Call trigger
|
||||||
|
$result = $this->call_trigger('CONTACT_DELETE', $user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
// End call triggers
|
||||||
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
// Get all rowid of element_contact linked to a type that is link to llx_socpeople
|
// Get all rowid of element_contact linked to a type that is link to llx_socpeople
|
||||||
$sql = "SELECT ec.rowid";
|
$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) {
|
if (!$error) {
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@ -28,9 +28,10 @@ if (!defined('NOREQUIREHTML')) {
|
|||||||
if (!defined('NOREQUIREAJAX')) {
|
if (!defined('NOREQUIREAJAX')) {
|
||||||
define('NOREQUIREAJAX', '1');
|
define('NOREQUIREAJAX', '1');
|
||||||
}
|
}
|
||||||
if (!defined('NOREQUIRESOC')) {
|
// Needed for create other object with workflow
|
||||||
|
/*if (!defined('NOREQUIRESOC')) {
|
||||||
define('NOREQUIRESOC', '1');
|
define('NOREQUIRESOC', '1');
|
||||||
}
|
}*/
|
||||||
if (!defined('NOCSRFCHECK')) {
|
if (!defined('NOCSRFCHECK')) {
|
||||||
define('NOCSRFCHECK', '1');
|
define('NOCSRFCHECK', '1');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.
|
// 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)
|
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';
|
//print 'VATRULE 2';
|
||||||
return get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice);
|
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') {
|
} 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"
|
// 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) {
|
if ($returnvalue) {
|
||||||
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
|
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1514,7 +1514,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
// Total remise
|
// Total remise
|
||||||
$total_line_remise = 0;
|
$total_line_remise = 0;
|
||||||
foreach ($object->lines as $i => $line) {
|
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
|
// Gestion remise sous forme de ligne négative
|
||||||
if ($line->total_ht < 0) {
|
if ($line->total_ht < 0) {
|
||||||
$total_line_remise += -$line->total_ht;
|
$total_line_remise += -$line->total_ht;
|
||||||
|
|||||||
@ -482,7 +482,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
$pageposafter = $pageposbefore;
|
$pageposafter = $pageposbefore;
|
||||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
$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();
|
$pageposafter = $pdf->getPage();
|
||||||
$posyafter = $pdf->GetY();
|
$posyafter = $pdf->GetY();
|
||||||
|
|||||||
@ -1224,7 +1224,7 @@ if (empty($reshook)) {
|
|||||||
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
||||||
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
||||||
$object->multicurrency_code = GETPOST('multicurrency_code', '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');
|
$object->fk_project = GETPOST('projectid', 'int');
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
|
|||||||
@ -58,6 +58,7 @@ MainAccountForSuppliersNotDefined=Main accounting account for vendors not define
|
|||||||
MainAccountForUsersNotDefined=Main accounting account for users not defined in setup
|
MainAccountForUsersNotDefined=Main accounting account for users not defined in setup
|
||||||
MainAccountForVatPaymentNotDefined=Main accounting account for VAT payment 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
|
MainAccountForSubscriptionPaymentNotDefined=Main accounting account for subscription payment not defined in setup
|
||||||
|
UserAccountNotDefined=Accounting account for user not defined in setup
|
||||||
|
|
||||||
AccountancyArea=Accounting area
|
AccountancyArea=Accounting area
|
||||||
AccountancyAreaDescIntro=Usage of the accountancy module is done in several step:
|
AccountancyAreaDescIntro=Usage of the accountancy module is done in several step:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user