Try adding this ADODB debug line at the top of the function:
$DB->debug = true;
It should give you some verbose output about what it's doing.
Paul
On 10/23/06, Michael Rulison <[EMAIL PROTECTED]> wrote:
>
>
> I have checked the file include/billing.inc.php with PHPDesigner2007 as
> debugging editor; it reports no errors. But from Citrus menu, print invoices
> causes error (at the end of the function add_taxdetails(), which is quoted
> below, for context.
>
> Here is the block of code, ending with "die" and a modified error message.
>
> function add_taxdetails($DB, $billingdate, $bybillingid, $billingmethod,
> $batchid) {
>
> /*--------------------------------------------------------------------*/
> // Add taxes to the bill
> // database connector, billing date, billing method (invoice, prepay ,
> // creditcard etc.), batch id
> // do this before services to make sure one time services get taxed
> // before they are removed
>
> /*--------------------------------------------------------------------*/
>
> //
> // query for taxed services that are billed on the specified date
> // or a specific billing id
> //
> if ($bybillingid == NULL) {
> $query = "SELECT ts.id ts_id,
> ts.master_services_id ts_serviceid,
> ts.tax_rate_id ts_rateid,
> ms.id ms_id, ms.service_description ms_description,
> ms.pricerate ms_pricerate, ms.frequency ms_freq,
> tr.id tr_id, tr.description tr_description, tr.rate tr_rate,
> tr.if_field tr_if_field, tr.if_value tr_if_value,
> us.master_service_id us_msid, us.billing_id us_bid,
> us.removed us_removed, us.account_number us_account_number,
> us.usage_multiple us_usage_multiple, te.account_number
> te_account_number, te.tax_rate_id te_tax_rate_id,
> b.id b_id, b.billing_type b_billing_type,
> t.id t_id, t.frequency t_freq, t.method t_method
> FROM taxed_services ts
> LEFT JOIN user_services us ON us.master_service_id =
> ts.master_services_id
> LEFT JOIN master_services ms ON ms.id = ts.master_services_id
> LEFT JOIN tax_rates tr ON tr.id = ts.tax_rate_id
> LEFT JOIN tax_exempt te ON te.account_number = us.account_number
> AND te.tax_rate_id = tr.id
> LEFT JOIN billing b ON us.billing_id = b.id
> LEFT JOIN billing_types t ON b.billing_type = t.id
> WHERE b.next_billing_date = '$billingdate'
> AND t.method = '$billingmethod' AND us.removed <> 'y'";
> } else {
> $query = "SELECT ts.id ts_id,
> ts.master_services_id ts_serviceid,
> ts.tax_rate_id ts_rateid,
> ms.id ms_id, ms.service_description ms_description,
> ms.pricerate ms_pricerate, ms.frequency ms_freq,
> tr.id tr_id, tr.description tr_description, tr.rate tr_rate,
> tr.if_field tr_if_field, tr.if_value tr_if_value,
> us.master_service_id us_msid, us.billing_id us_bid,
> us.removed us_removed, us.account_number us_account_number,
> us.usage_multiple us_usage_multiple, te.account_number
> te_account_number, te.tax_rate_id te_tax_rate_id,
> b.id b_id, b.billing_type b_billing_type,
> t.id t_id, t.frequency t_freq, t.method t_method
> FROM taxed_services ts
> LEFT JOIN user_services us ON us.master_service_id =
> ts.master_services_id
> LEFT JOIN master_services ms ON ms.id = ts.master_services_id
> LEFT JOIN tax_rates tr ON tr.id = ts.tax_rate_id
> LEFT JOIN tax_exempt te ON te.account_number = us.account_number
> AND te.tax_rate_id = tr.id
> LEFT JOIN billing b ON us.billing_id = b.id
> LEFT JOIN billing_types t ON b.billing_type = t.id
> WHERE b.id = '$bybillingid' AND us.removed <> 'y'";
> }
> $DB->SetFetchMode(ADODB_FETCH_ASSOC);
> $taxresult = $DB->Execute($query) or die ("Taxes Query Failed; Citrus
> 103") ;
>
> $taxresult produces the die side of the ''or' statement
> Could it be a problem with the $DB variable?
> How can I check it, please?
>
> -----------------------------------------------------------------------------
> Michael Rulison | 919/782-9576
> Raleigh NC 27607-6723
> -----------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> Citrusdb-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/citrusdb-users
>
>
>
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Citrusdb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/citrusdb-users