Topic: Change Item Description Field to long_description Field.

hey,

I am trying to change the template of the invoice , I want to print the (long_description of the Items) instead of (Item Description Name), why..? Because I want to put a two lines of Item name, one line for Englishand another one for the Arabic language.

Please let me know about how to do it, I need to print two languages in the name of items.

Regards.

Re: Change Item Description Field to long_description Field.

Try to put in both languages in the name itself or alter the rep107.php accordingly.

Re: Change Item Description Field to long_description Field.

can you guide me, please..

Because I want to put it in a two line, not one line.

Just if you can let me know what i have to edit in rep107.php ..?

and Thank You very much..

Re: Change Item Description Field to long_description Field.

First, enable the availability of the long_description field in the function get_customer_trans_details in sales/includes/db/cust_trans_details_db.inc by inserting the following line as line 23:

        item.long_description As StockLongDescription,

** @joe: the above can be implemented now **




Then put in these lines at line 166 in reporting/rep107.php:

                $c--;
                $rep->TextColLines($c++, $c, $myrow2['StockLongDescription'], -2);

If you have your Arabic fonts correctly setup to print Arabic characters in reports, all should be well.

Without Arabic Reporting fonts, some testing snapshots are attached.

Post's attachments

TwoLineDesc_Tests.zip 106.6 kb, 11 downloads since 2020-06-12 

You don't have the permssions to download the attachments of this post.

Re: Change Item Description Field to long_description Field.

Apmuth
It works nicely. I get the attached results.

Post's attachments

shot_200612_103049.png 40.7 kb, 1 downloads since 2020-06-12 

You don't have the permssions to download the attachments of this post.

Re: Change Item Description Field to long_description Field.

@rafat: Thanks for the feedback. Hence no utf8_encode() was necessary if the necessary fonts are installed and called upon.

@joe: This can be implemented in the core for 2 line item in invoice with a SysPrefs flag for a company-wise choice.

Re: Change Item Description Field to long_description Field.

Will have a look at this.

Joe

Re: Change Item Description Field to long_description Field.

Dear Mr. @apmuthu

I don't know what I have to say to you more than Thank You very very very much...
I really appreciate your efforts, It's work for me very well...

I don't know how attache the output image to share with you...

Thank You again.. ♥

Re: Change Item Description Field to long_description Field.

Hello Guys,

This has now been committed to stable 2.4.8 repo. A new Company flag, Use Long Description on Invoices, has been created in the left pane at the bottom.
If this checkbox is set, the Long Item Description lines will be printed as well on Sales Invoices.

The following 3 files were changed and can be downloaded here:

https://sourceforge.net/p/frontaccounti … rences.php
https://sourceforge.net/p/frontaccounti … ils_db.inc
https://sourceforge.net/p/frontaccounti … rep107.php.

@apmuthu

Please update the Wiki with these important features. Thanks in advance.

/Joe

/apmuthu: Done.

Post's attachments

LongDescFlag_SysPrefs.png 34.4 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Change Item Description Field to long_description Field.

@joe: Can update the sys_prefs data in the default chart sqls with:

,('long_description_invoice', 'setup.company', 'tinyint', '1', '0')

Also, see if the attached patch for reporting/rep107.php can be incorporated.

Post's attachments

rep107_patch.diff 2.2 kb, 6 downloads since 2020-06-13 

You don't have the permssions to download the attachments of this post.

Re: Change Item Description Field to long_description Field.

@apmuthu,

All done. Committed to repo, 2.4.8.

The fixed Invoice Document, rep107.php, can be downloaded here.

/Joe

Re: Change Item Description Field to long_description Field.

Hello , Mr. apmuthu

Can you please also add the same in Quotations..?
This will be good for any one use 2 language..

thank you..

Re: Change Item Description Field to long_description Field.

joe wrote:

@apmuthu,

All done. Committed to repo, 2.4.8.

The fixed Invoice Document, rep107.php, can be downloaded here.

/Joe

Can you please also add the same in Quotations..?
This will be good for any one use 2 language..

thank you..

Re: Change Item Description Field to long_description Field.

@joe: Any changes, if minor, can be accommodated for 2 languages in Quotations into the core.

Re: Change Item Description Field to long_description Field.

Sorry Guys I am bringing this up as another user is asking for the same (Long Item Description) on Quotations.
https://frontaccounting.com/punbb/viewtopic.php?id=9788

Hope you can help them.