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

Re: Print issue



Hi;

I have a couple questions about your installation before I answer your questions.

1)  Is this a new installation or an upgrade?
2)  Which chart of accounts are you using?

On 5/10/07, ..hidden.. <..hidden..> wrote:
Hello,

I am testing the pre-release 1.2.5 and cannot print a sales order.
An error is displayed like:
menu.pl:88: Can't locate LedgerSMB/Taxes/.pm ...  at LedgerSMB/Tax.pm
line 62.

I've done a look in the Tax.pm and changed near the line 61:
#         my $module = $ref->{'taxmodulename'};
        my $module = 'Simple';

For now, that will work.  If you need other tax rules later, that may cause problems.

The best way to handle this go to the System->Taxes screen, set all the rules to simple, and the ordering to the same number (i.e. 1) unless you need cumulative tax calculation (i.e. in some places like Quebec, some tax rates are applied to the subtotal including other tax rates).

Then click save.
 

Since then it is working. Seems to be a fault in the previous select
statment:
    my $query = qq|SELECT t.taxnumber, c.description,
                        t.rate, t.chart_id, t.pass, m.taxmodulename
                        FROM tax t INNER JOIN chart c ON (t.chart_id =
c.id)
                        INNER JOIN taxmodule m ON (t.taxmodule_id =
m.taxmodule_id)
                        WHERE c.accno = ?|;
It returns nothing!

I am not a postgres expert, but what means the question mark in the
where-clause?

It is the prepared statement placeholder for Perl's DBI.

THat value is then provided during the statement handle's execute method.

i.e. $sth = $dbh->prepare($prepared_query); can use those placeholders.
$sth->execute(@arglist); executes the query with those arguments.

Best Wishes,
Chris Travers