Topic: Modify ITEM CODE???

Hi

Is it possible to enable editing of the ITEM CODE?

Re: Modify ITEM CODE???

With the help of item code. everything programmed. So its not good to change. If you wish to change, you have to do it manually with mysql queries.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Modify ITEM CODE???

I am experienced programmer of dBASE III Plus and FoxPro but no experience of SQL.

I am sorry, but it is not understandable how the program can be affected with user input data. hmm

If the user inputs wrong item code, and then record some transactions. Later he notices that he had done some mistake, how would he make the correction.

Creating a new item and making the old item inactive is not appropriate solution. Old transactions cannot be linked with the new item!

Re: Modify ITEM CODE???

Is it that you want to change the item itself in say an invoice or sales order? Editing them are available in FA.

After you have made transactions using one item code, you cannot change the item code in the stock_master, but you can change it's name description to suit the correct one. You can also make a new item code for another item and then edit the old transactions accordingly. The item_code like the stock_id are identifying keys in the tables and foreign keys in others like the transaction tables.

MySQL and dBASE III / FoxPro are the same as far as data storage visibility are concerned. Only the relations are set in the sql command in MySQL. The relations are set as separate statements in dBASE III / FoxPro in the operational area.

5 (edited by abuhafss 01/02/2018 05:36:28 am)

Re: Modify ITEM CODE???

apmuthu wrote:

Is it that you want to change the item itself in say an invoice or sales order? Editing them are available in FA.

Actually my requirement is to show only the Item name and its Description on the Invoices, not the item code.

The item_code like the stock_id are identifying keys in the tables and foreign keys in others like the transaction tables.

I had guessed the same. But instead the identifying key of the ITEMS table should have been used, as normal practice.

Only the relations are set in the sql command in MySQL.

Yeah, this and PHP are the main issues for me, unfortunately.
I am trying to acquaint myself with SQL commands from online tutorials but php is time consuming.

Re: Modify ITEM CODE???

The same item (stock_id) may be referred to as different items by different suppliers.
Suppress the item code display in the reports (invoices) by editing out the line items in the appropriate reports (reporting/repXXX.php)

Re: Modify ITEM CODE???

Where can I get the list/menu of repXXX.php reports? (I mean which number report number is for what report?)

Re: Modify ITEM CODE???

Have you tried the wiki? Before asking a question in the forum its always best to read the wiki first

The FrontAccounting Wiki(Manual, examples, tips, setup info, links to accounting sites, etc) https://frontaccounting.com/fawiki/

Re: Modify ITEM CODE???

https://frontaccounting.com/fawiki/index.php?n=Help.ReportsAndAnalysis

10 (edited by trafficpest 01/07/2018 11:08:28 am)

Re: Modify ITEM CODE???

I as well want the 'long_description' on the invoice but I can't find it in the tables? inventory/manage/items.php says its called 'long_decription' I tried to replace

$rep->TextColLines($c++, $c, $myrow2['StockDescription'], -2);
to:
$rep->TextColLines($c++, $c, $myrow2['long_description'], -2);

in /reporting/rep107.php but I get a blank spot on the invoice so, when I checked the DB I couldn't find it in the item_codes table
Where is it held?  Am I totally wrong?

Re: Modify ITEM CODE???

Line 146 in reporting/rep107.php calls the function get_customer_trans_details() defined at the top of includes/db/cust_trans_details_db.inc. In the said function definition, change line 21:

        line.description As StockDescription,

to be:

        line.description AS StockDescription, item.long_description AS FullDescription,

and now change the line 166 in reporting/rep107.php:

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

to be:
[

                $rep->TextColLines($c++, $c, (($myrow2['FullDescription'] != '') ? $myrow2['FullDescription'] : $myrow2['StockDescription']), -2);

The field long_description may be available in multiple tables denoting other contexts. The existing StockDescription is retained as a fallback.

Caveat: Note that as FullDescription is taken from the stock_master table's long_description field, it may not be consistently available especially if changed or deleted in it later, whereas, the StockDescription will be available even without it from the stock_master table. It may be prudent to use both when the FullDescription is available.

@joe: would you like to commit the first code change in cust_trans_details_db.inc making the long_description for those who want it as well?