Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
9125ac61a8
@ -1208,6 +1208,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";
|
||||||
@ -1298,15 +1307,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;
|
||||||
|
|||||||
@ -6044,7 +6044,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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1510,7 +1510,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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user