+function get_default_supplier_payment_bank_account($supplier_id, $date)
+{
+ $previous_payment = get_supp_payment_before($supplier_id, date2sql($date));
+ if ($previous_payment)
+ {
+ return $previous_payment['bank_id'];
+ }
+ return get_default_supplier_bank_account($supplier_id);
+}
+//----------------------------------------------------------------------------------------
+