summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/pos.pl6
-rw-r--r--sql/Pg-database.sql3
-rw-r--r--sql/modules/Payment.sql2
3 files changed, 3 insertions, 8 deletions
diff --git a/bin/pos.pl b/bin/pos.pl
index bf00ab0b..5eb0754a 100644
--- a/bin/pos.pl
+++ b/bin/pos.pl
@@ -65,11 +65,6 @@ sub custom_send_to_pd{
close SOCK;
}
-sub on_update{
- &custom_send_to_pd;
- &custom_check_alert;
-}
-
sub open_drawer{
require "pos.conf.pl";
open (PRINTER, "|-", ${'LedgerSMB::Sysconfig::printer'}{Printer});
@@ -947,7 +942,6 @@ sub print {
sub print_form {
my $old_form = shift;
- &open_drawer;
# if oldcustomer ne customer redo form
$customer = $form->{customer};
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql
index 61edb2e7..96dea912 100644
--- a/sql/Pg-database.sql
+++ b/sql/Pg-database.sql
@@ -614,6 +614,7 @@ CREATE TABLE ar (
on_hold bool default false,
reverse bool default false,
approved bool default true,
+ credit_account int references entity_credit_account(id) not null,
description text
);
@@ -649,7 +650,7 @@ CREATE TABLE ap (
reverse bool default false,
terms int2 DEFAULT 0,
description text,
- credit_account int
+ credit_account int references entity_credit_account(id)
);
COMMENT ON COLUMN ap.entity_id IS $$ Used to be customer_id, but customer is now metadata. You need to push to entity $$;
diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql
index 7accdae1..b2f643ab 100644
--- a/sql/modules/Payment.sql
+++ b/sql/modules/Payment.sql
@@ -61,7 +61,7 @@ CREATE TYPE payment_invoice AS (
);
CREATE OR REPLACE FUNCTION payment_get_open_invoices
-(in_account_class int, in_entity_id int, in_curr char(3))
+(in_account_class int, in_entity_credit_id int, in_curr char(3))
RETURNS SETOF payment_invoice AS
$$
DECLARE payment_inv payment_invoice;