Преглед на файлове

Fix: Do not send remind to pay when invoice is closed

Laurent Destailleur преди 12 години
родител
ревизия
ee590d714d
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      scripts/invoices/email_unpaid_invoices_to_customers.php
  2. 1 1
      scripts/invoices/email_unpaid_invoices_to_representatives.php

+ 1 - 1
scripts/invoices/email_unpaid_invoices_to_customers.php

@@ -82,7 +82,7 @@ $sql.= " s.rowid as sid, s.nom as name, s.email, s.default_lang";
 if ($targettype == 'contacts') $sql.= ", sp.rowid as cid, sp.firstname as cfirstname, sp.lastname as clastname, sp.email as cemail";
 $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
 if ($targettype == 'contacts') $sql.= ", ".MAIN_DB_PREFIX."socpeople as sp";
-$sql.= " WHERE f.fk_statut != 0 AND f.paye = 0";
+$sql.= " WHERE f.fk_statut = 1 AND f.paye = 0";
 $sql.= " AND f.fk_soc = s.rowid";
 if (is_numeric($duration_value2)) $sql.= " AND f.date_lim_reglement >= '".$db->idate(dol_time_plus_duree($now, $duration_value2, "d"))."'";
 if (is_numeric($duration_value)) $sql.= " AND f.date_lim_reglement < '".$db->idate(dol_time_plus_duree($now, $duration_value, "d"))."'";

+ 1 - 1
scripts/invoices/email_unpaid_invoices_to_representatives.php

@@ -80,7 +80,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
 $sql .= " , ".MAIN_DB_PREFIX."societe as s";
 $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
 $sql .= " , ".MAIN_DB_PREFIX."user as u";
-$sql .= " WHERE f.fk_statut != 0 AND f.paye = 0";
+$sql .= " WHERE f.fk_statut = 1 AND f.paye = 0";
 $sql .= " AND f.fk_soc = s.rowid";
 if (is_numeric($duration_value)) $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_time_plus_duree($now, $duration_value, "d"))."'";
 $sql .= " AND sc.fk_soc = s.rowid";