| ';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
{
- if (! $filter || $filter=="fk_facture_source IS NULL") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; // If we want deposit to be substracted to payments only and not to total of final invoice
- else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': ';
+ if (! $filter || $filter=="fk_facture_source IS NULL") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency)).': '; // If we want deposit to be substracted to payments only and not to total of final invoice
+ else print $langs->trans("CompanyHasCreditNote",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
}
else
{
- if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,1,$langs,0,0,-1,$conf->currency)).': ';
- else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': ';
+ if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
+ else print $langs->trans("CompanyHasCreditNote",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
}
$newfilter='fk_facture IS NULL AND fk_facture_line IS NULL'; // Remises disponibles
if ($filter) $newfilter.=' AND ('.$filter.')';
diff --git a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php
index 17ba4b11f4f..77318bee795 100644
--- a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php
+++ b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php
@@ -142,7 +142,7 @@ class InterfaceMailmanSpipsynchro
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
// We add subscription if we change category (new category may means more mailing-list to subscribe)
- if ($object->linkto->add_to_abo() < 0)
+ if (is_object($object->linkto) && method_exists($object->linkto, 'add_to_abo') && $object->linkto->add_to_abo() < 0)
{
$this->error=$object->linkto->error;
$this->errors=$object->linkto->errors;
@@ -160,7 +160,7 @@ class InterfaceMailmanSpipsynchro
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
// We remove subscription if we change category (lessw category may means less mailing-list to subscribe)
- if ($object->unlinkoff->del_to_abo() < 0)
+ if (is_object($object->unlinkoff) && method_exists($object->unlinkoff, 'del_to_abo') && $object->unlinkoff->del_to_abo() < 0)
{
$this->error=$object->unlinkoff->error;
$this->errors=$object->unlinkoff->errors;
diff --git a/test/.gitignore b/test/.gitignore
index a5719aecc87..3e708fa593a 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1 +1,2 @@
/report
+/test.xml
|