1 (edited by apmuthu 09/01/2014 07:48:15 am)

Topic: Items vs. Foreign Item Codes

In Items and Inventory -> Items there is no place to enter the open stock of the Item and the item_code = stock_id and the hardcoded quantity = 1 whilst is_foreign = 0.

In Items and Inventory -> Foreign Item Codes there is a place to enter stock and the item_code can be blank or be set to the ISBN13 code (or EAN/UPC) whilst the stock_id can be non unique since the primary key is the id field and the is_foreign = 1.

Both these entries get into the same table #_items and are treated individually and both forms have the category field - so the same stock_id can belong to 2 different categories if they come from different forms above.

Post's attachments

FA_Items_Data_Entry.png 16.2 kb, file has never been downloaded. 

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

Re: Items vs. Foreign Item Codes

In Items and Inventory -> Items the primary database entries (assuming company #2) are:

insert  into `2_item_codes`(`id`,`item_code`,`stock_id`,`description`,`category_id`,`quantity`,`is_foreign`,`inactive`)
 values 
(1,'TUNEV1','TUNEV1','A Tune a Day for Violin - Book 1',1,1,0,0);

insert  into `2_loc_stock`(`loc_code`,`stock_id`,`reorder_level`)
 values 
('DEF','TUNEV1',0);

insert  into `2_stock_master`(`stock_id`,`category_id`,`tax_type_id`,`description`,`long_description`,`units`,`mb_flag`,`sales_account`,`cogs_account`,`inventory_account`,`adjustment_account`,`assembly_account`,`dimension_id`,`dimension2_id`,`actual_cost`,`last_cost`,`material_cost`,`labour_cost`,`overhead_cost`,`inactive`,`no_sale`,`editable`)
 values 
('TUNEV1',1,2,'A Tune a Day for Violin - Book 1','A Tune a Day for Violin - Book 1 by C. Paul Herfurth packed full of lessons, illustrations, fingering charts, daily practice records, test questions, and manuscript paper for homework.','each','B','4010','5010','1510','5040','1530',0,0,0,0,0,0,0,0,0,0);

When the sales price gets entered:

insert  into `2_prices`(`id`,`stock_id`,`sales_type_id`,`curr_abrev`,`price`)
 values 
(1,'TUNEV1',1,'SGD',12);