Topic: How to remove aux_info box & to show the invoice total amount words.

I want to remove completely the aux_info box from the sales invoice.

Fields like customer reference, sales person, vat no, delivery note no and due date are irrelevant to my company and i want to completely remove this box.

Can anyone one tell me the exact code line in header2 and doctext, to which i have to edit/remove, to resolve this issue. ?

Secondly, i also want to show the total invoice amount in words. e.g "1520" as

"Payable Amount in words : One Thousand Five Hundred and twenty only."

How can i do this?

2 (edited by apmuthu 01/13/2013 11:07:39 pm)

Re: How to remove aux_info box & to show the invoice total amount words.

Each element is populated in the report only if the variable exists.
unsetting the "not required" elements of variable $this->company like $this->company['gst_no'] during report population and the setting it back would suffice.

As for number to words, use a function price_in_words() in your language locale.inc (this does not seem to be documented yet).

Price in words. $doc_type is set to document type and can be used to suppress
price in words printing for selected document types.
Used instead of built in simple english price_in_words() function.

The default function price_in_words() is defined in includes/ui/ui_view.inc and the default documents it is used in are when $document is any of ST_SUPPAYMENT / ST_CUSTPAYMENT / ST_CHEQUE

The actual number to words conversion is done in the function _number_to_words() in the same file.

Re: How to remove aux_info box & to show the invoice total amount words.

apmuthu wrote:

Each element is populated in the report only if the variable exists.
unsetting the "not required" elements of variable $this->company like $this->company['gst_no'] during report population and the setting it back would suffice.

As for number to words, use a function price_in_words() in your language locale.inc (this does not seem to be documented yet).

Price in words. $doc_type is set to document type and can be used to suppress
price in words printing for selected document types.
Used instead of built in simple english price_in_words() function.

The default function price_in_words() is defined in includes/ui/ui_view.inc and the default documents it is used in are when $document is any of ST_SUPPAYMENT / ST_CUSTPAYMENT / ST_CHEQUE

The actual number to words conversion is done in the function _number_to_words() in the same file.

I wish i could have a dislike button, to rate this post reply.

No offences to senior members, but you people should draft replies in such a way that they are crisp, clear and easy to understand.

Re: How to remove aux_info box & to show the invoice total amount words.

I resolved both the issues successfully :

1) edited the code in header2 and doctext. removed the code that created the box of aux_info. (spent around 5 hrs, in identifying the exact code lines to edit.)

2) created a new function, which converts the number into words in a new file....and included such file in doctext, header and rep107.php files.

Re: How to remove aux_info box & to show the invoice total amount words.

ahmedtaufiq wrote:

I wish i could have a dislike button, to rate this post reply.

No offences to senior members, but you people should draft replies in such a way that they are crisp, clear and easy to understand.

I think you should be happy that there are members on this forum that react very quick on (your) question(s)......