Hi Max,
On Sun, Sep 21, 2014 at 9:19 PM, Max van Biezen <mvanb...@gmail.com> wrote:
> Hi,
>
> The next one in the Latex / PDF saga. Using 1.4.0 release. When I
> generate an invoice as PDF then the column "Description" is empty.
> Apart from this the PDF looks correct and nicely formatted.
>
> In the error.log I get
>
> Use of uninitialized value $vars in substitution (s///) at
> LedgerSMB/Template/LaTeX.pm line 111.
> Use of uninitialized value $vars in substitution (s///) at
> LedgerSMB/Template/LaTeX.pm line 112.
> .
> .
> Use of uninitialized value $vars in substitution (s///) at
> LedgerSMB/Template/LaTeX.pm line 114.
> Use of uninitialized value $sign in numeric lt (<) at
> /usr/share/perl5/Number/Format.pm line 542.
> Use of uninitialized value $sign in numeric lt (<) at
> /usr/share/perl5/Number/Format.pm line 490.
> Use of uninitialized value $sign in numeric lt (<) at
> /usr/share/perl5/Number/Format.pm line 590.
> Use of uninitialized value $vars in substitution (s///) at
> LedgerSMB/Template/LaTeX.pm line 111.
> Use of uninitialized value $vars in substitution (s///) at
> LedgerSMB/Template/LaTeX.pm line 114.
> Use of uninitialized value in lc at /usr/share/perl5/LaTeX/Driver.pm line
> 137.
> 2014/09/21 21:09:10 - DEBUG - LedgerSMB::Template::render
> LedgerSMB/Template.pm (357) -- before self output
> 2014/09/21 21:09:10 - DEBUG - LedgerSMB::Template::render
> LedgerSMB/Template.pm (359) -- after self output,but does not seem to
> return here!
>
> In the invoice.tex I use the line (from templates/demo_with_image):
>
> \begin{longtable}{@{\extracolsep{\fill}}r|llcrr|r}
>
> \textbf{<?lsmb text('Item') ?>}
> & \textbf{<?lsmb text('Number') ?>}
> & \textbf{<?lsmb text('Description') ?>}
> & \textbf{<?lsmb text('Qty') ?>}
> & \textbf{<?lsmb text('Price') ?>}
> & \textbf{<?lsmb text('Disc %') ?>}
> & \textbf{<?lsmb text('Amount') ?>}
> \endhead
> <?lsmb FOREACH number ?>
> <?lsmb lc = loop.count - 1 ?>
> <?lsmb runningnumber.${lc} ?> &
> <?lsmb number.${lc} ?> &
> <?lsmb INCLUDE multiline string = description.${lc} ?> &
> <?lsmb qty.${lc} ?> &
> <?lsmb sellprice.${lc} ?> &
> <?lsmb discountrate.${lc} ?> &
> <?lsmb linetotal.${lc} ?> \\
> <?lsmb END ?>
>
> There is no difference when I change this to: <?lsmb description.${lc} ?> &
>
> The database I am using is converted from a 1.3.40 DB converted to
> 1.4.0. How to debug this to get more information on why this field is
> empty in de PDF?
>
Well, currently, I'd say the answer is reading the code -- which is
non-satisfactory. We're working our way toward a more object oriented model
where you can simply look up the fields of the objects which will then also
be available in the the expansion of the template.
Now as to why the expansion is empty: could you try changing the template
to the following, replacing 'description.$(lc)' with
'item_description.$(lc)'?
My vague recollection is that both the invoice in general and the items
specifically have a "description" field. We had to split those into
different names for the template.
--
Bye,
Erik.
http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
Ledger-smb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users