asterisk2billing.org
http://forum.asterisk2billing.org/

sending email and postgresql, not working
http://forum.asterisk2billing.org/viewtopic.php?f=18&t=10162
Page 1 of 1

Author:  aztrock [ Fri Dec 28, 2012 2:16 am ]
Post subject:  sending email and postgresql, not working

when I try to send an email, I get the following error, and not found an SQL function as it should. any suggestions?

Code:
2012-12-27 21:14:38 COT ERROR:  no existe la función if(boolean, numeric, numeric) en carácter 11
2012-12-27 21:14:38 COT HINT:  Ninguna función coincide en el nombre y tipos de argumentos. Puede desear agregar conversión explícita de tipos.
2012-12-27 21:14:38 COT SENTENCIA:  SELECT *, IF((typepaid=1) AND (creditlimit IS NOT NULL), credit + creditlimit, credit) AS real_credit FROM cc_card WHERE  id = 14


this error occurs when you try to send an email

Operation System Version : Debian GNU/Linux 6.0.4 (squeeze)
Asterisk Version : 1.8
PHP Version : 5.3.3-7+squeeze14
A2B DataBase Version : 1.7.0
User Interface : A2Billing v2.0.1 is a voip billing software licensed under the AGPL 3.
Copyright (C) 2004-2012 Star2billing S.L. http://www.star2billing.com/
User Interface Path : /var/www/asterisk/a2billing/admin/Public/dashboard.php/

MYSQL : PostgreSQL 8.4.13 on i486
A2Billing v2.0.1

Author:  bucasia [ Sat Dec 29, 2012 10:02 am ]
Post subject:  Re: sending email and postgresql, not working

This doesn't look right -

A2B DataBase Version : 1.7.0
User Interface : A2Billing v2.0.1

Did you run the database update scripts when upgrading to v2.0.1?

Author:  aztrock [ Sun Dec 30, 2012 1:55 am ]
Post subject:  Re: sending email and postgresql, not working

such a problem, because PostgreSQL only goes up to 1.7, and would like to make changes to upload an update for postgresql to 2.0.1, but there are little things you do not like it and I corrected one or two things, but there querys hard enough :D

bucasia wrote:
This doesn't look right -

A2B DataBase Version : 1.7.0
User Interface : A2Billing v2.0.1

Did you run the database update scripts when upgrading to v2.0.1?

Author:  aztrock [ Wed Jan 09, 2013 2:56 am ]
Post subject:  Re: sending email and postgresql, not working

temporary solution.

vim ./Class.Mail.php

line 147:
Code:
$card_table = new Table("cc_card", "*, IF((typepaid=1) AND (creditlimit IS NOT NULL), credit + creditlimit, credit) AS real_credit");

to
Code:
$card_table = new Table("cc_card", "*, credit AS real_credit");


AND line 188:
Code:
$card_table = new Table("cc_card", "*, IF((typepaid=1) AND (creditlimit IS NOT NULL), credit + creditlimit, credit) AS real_credit");

to
Code:
$card_table = new Table("cc_card", "*, credit AS real_credit");

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/