[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error creating invoice LSMB 1.3.39.



 Hi,

As I remember, remark is a "new" field for bank account. It should be created in upgrade (Fixes.sql) or in a new setup.

Please check your Fixes.sql from line 563 to 635, you should be see this part:



BEGIN;
 ALTER TABLE entity_bank_account ADD COLUMN remark varchar;
 COMMENT ON COLUMN entity_bank_account.remark IS
$$ This field contains the notes for an account, like: This is USD account, this one is HUF account, this one is the default account, this ac$
$$;

DROP FUNCTION eca__save_bank_account (int, int, text, text, int);
DROP FUNCTION entity__save_bank_account (int, text, text, int);

CREATE OR REPLACE FUNCTION eca__save_bank_account
(in_entity_id int, in_credit_id int, in_bic text, in_iban text, in_remark text,
in_bank_account_id int)
RETURNS int AS
$$
DECLARE out_id int;
BEGIN
 UPDATE entity_bank_account
 SET bic = in_bic,
 iban = in_iban,
 remark = in_remark
 WHERE id = in_bank_account_id;

 IF FOUND THEN
 out_id = in_bank_account_id;
 ELSE
 INSERT INTO entity_bank_account(entity_id, bic, iban, remark)
 VALUES(in_entity_id, in_bic, in_iban, in_remark);
 SELECT CURRVAL('entity_bank_account_id_seq') INTO out_id ;
 END IF;

 IF in_credit_id IS NOT NULL THEN
 UPDATE entity_credit_account SET bank_account = out_id
 WHERE id = in_credit_id;
 END IF;

 RETURN out_id;
END;
$$ LANGUAGE PLPGSQL;

COMMENT ON FUNCTION eca__save_bank_account
(in_entity_id int, in_credit_id int, in_bic text, in_iban text, in_remark text,
in_bank_account_id int) IS
$$ Saves bank account to the credit account.$$;

CREATE OR REPLACE FUNCTION entity__save_bank_account
(in_entity_id int, in_bic text, in_iban text, in_remark text, in_bank_account_id int)
RETURNS int AS
$$
DECLARE out_id int;
BEGIN
 UPDATE entity_bank_account
 SET bic = in_bic,
 iban = in_iban,
 remark = in_remark
 WHERE id = in_bank_account_id;

 IF FOUND THEN
 out_id = in_bank_account_id;
 ELSE
 INSERT INTO entity_bank_account(entity_id, bic, iban, remark)
 VALUES(in_entity_id, in_bic, in_iban, in_remark);
 SELECT CURRVAL('entity_bank_account_id_seq') INTO out_id ;
 END IF;

 RETURN out_id;
END;
$$ LANGUAGE PLPGSQL;

COMMENT ON FUNCTION entity__save_bank_account
(in_entity_id int, in_bic text, in_iban text, in_remark text, in_bank_account_id int) IS
$$Saves a bank account to the entity.$$;

COMMIT;
 
----------------eredeti üzenet-----------------
Feladó: "Arne Hanssen" 
Címzett: "Ledger SMB" ..hidden.. 
Dátum: Sun, 06 Apr 2014 19:35:11 +0200
-------------------------------------------------
 
 
> After [Post]-ing a sales invoice I can't print the invoice from the next 
> screen. When I click [Print] I get this error:
> 
> Internal Server Error
> The server encountered an internal error or misconfiguration and was 
> unable to complete your request.
> 
> Apache log shows:
> [Sun Apr 06 19:14:48 2014] [error] [client 192.168.5.1] DBD::Pg::st 
> execute failed: ERROR: column "remark" does not exist, referer: 
> http://ledgersmb.kingel.net/is.pl
> [Sun Apr 06 19:14:48 2014] [error] [client 192.168.5.1] LINE 8: ... 
> '' AS customertaxnumber, sic_code AS sic, iban, remark,, referer: 
> http://ledgersmb.kingel.net/is.pl
> [Sun Apr 06 19:14:48 2014] [error] [client 192.168.5.1] 
> ^ at LedgerSMB/IS.pm 
> line 909., referer: http://ledgersmb.kingel.net/is.pl
> [Sun Apr 06 19:14:48 2014] [error] [client 192.168.5.1] DBD::Pg::st 
> execute failed: ERROR: current transaction is aborted, commands ignored 
> until end of transaction block at LedgerSMB.pm line 834., referer: 
> http://ledgersmb.kingel.net/is.pl
> [Sun Apr 06 19:14:48 2014] [error] [client 192.168.5.1] 2014/04/06 
> 19:14:48 - ERROR - LedgerSMB::dberror LedgerSMB.pm (1102) -- Logging SQL 
> State 25P02, error 7, string ERROR: current transaction is aborted, 
> commands ignored until end of transaction block, referer: 
> http://ledgersmb.kingel.net/is.pl
> [Sun Apr 06 19:14:48 2014] [error] [client 192.168.5.1] Can't use string 
> ("LedgerSMB::Setting") as a HASH ref while "strict refs" in use at 
> LedgerSMB.pm line 942., referer: http://ledgersmb.kingel.net/is.pl
> [Sun Apr 06 19:14:48 2014] [error] [client 192.168.5.1] Compilation 
> failed in require at /home/httpd/ledgersmb/is.pl line 7., referer: 
> http://ledgersmb.kingel.net/is.pl
> [Sun Apr 06 19:14:48 2014] [error] [client 192.168.5.1] Premature end of 
> script headers: is.pl, referer: http://ledgersmb.kingel.net/is.pl
> 
> Seems like column "remark" is missing. How do I fix this? Invoicing 
> worked fine up to version 1.3.37 (1.3.38 was used only briefly before 
> upgrading to 1.3.39).
> 
> -- 
> Vennlig hilsen / Best regards |\ ___,,--, _
> Arne Hanssen, Senja, Norway /,`--'' \-,,__,'/
> [ Linux counter #102028 @ ] |,4 ) )_ ) /~-----'
> [ http://linuxcounter.net ]------'---^~(_/-_)--(_/_)-------
> 
> 
> --------------------------------------------------------------------
> ----------
> _______________________________________________
> Ledger-smb-users mailing list
> ..hidden.. 
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
> 



------------------------------------------------------------------------------
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users