Home > Back-end >  "Seek enthusiastic help warehouse management system"
"Seek enthusiastic help warehouse management system"

Time:10-12

Warehouse management system have a problem with a disability to get rid of inventory quantity after receipt submitted into plus GRN number is now a submit GRN inventory quantity becomes 0 here is the small number of code//warehouse to check whether there is a certain position in the library the item selstr:='select * from store_info where' + 'pro_code=' "+ ComboBox2. Text + ' ' 'and place_code='" + ComboBox5. Text + "'" '; If store. StoreRec (selstr)=false thenbegin//if not, just insert the information of the inventory items inventory information in the table instr:="insert into store_info (pro_code store_pro_num, unit, place_code '+') values (' ' '+ edit1. Text +' ' ', ' ' '+ SpinEdit1. Text +' ' ', ' ' '+ ComboBox3. Text +' ' ', ' ' '+ ComboBox5. Text +' ' ') '. Store. StoreRecInsert (instr); Endelsebegin//if there is, you need the original number and the storage quantity added, and the inventory information in the table number changes as the result of the combined pro_num:=strtoint (pro_numed. Text) + strtoint (store. GetStoreNum (selstr)); Modstr:='update store_info set store_info. STORE_PRO_NUM=' "+ inttostr (pro_num) +" '"' + 'where pro_code=' "+ ComboBox2. Text + ' ' 'and place_code='" + ComboBox5. Text + "'" '; Store. StoreRecUpdate (modstr); end;
If you modify the code above will not solve the problem I hope the great god can leave a small email a unit code change is not very trouble to help me thank you very much

CodePudding user response:

No one help you,

CodePudding user response:

Submit the receipt, then perform the SQL query inventory,

CodePudding user response:

Generally do not change the standing crop data directly, but will be in receipt of a specific data!
Then the executive summary of existing scale to query the stock on hand!
Directly change the data more dangerous!
Deal with the irreversible!

CodePudding user response:

reference lengyuehui reply: 3/f
generally do not change the standing crop data directly, but will be in receipt of a specific data!
Then the executive summary of existing scale to query the stock on hand!
Directly change the data more dangerous!
Deal with the irreversible!
makes sense

CodePudding user response:

See if there are any write the trigger

CodePudding user response:

You mean this problem, the receipt is submitted after Posting warehouse should increase the number of inventory list did not increase now? This should be your written judgment, there does not exist with attention to characters of Spaces null values, etc.,

CodePudding user response:

When put in storage to check whether there is a certain position in the library the item selNum:=GetQuantity (' select number from store_info where '+' pro_code='" + ComboBox2. Text +' ' 'and place_code=' "+ ComboBox5. Text +" '")

Whether selNum 0

If doesn't exist, insert the information of the inventory items inventory information in the table instr:="insert into store_info (pro_code store_pro_num, unit, place_code '+') values (' ' '+ edit1. Text +' ' ', ' ' '+ SpinEdit1. Text +' ' ', ' ' '+ ComboBox3. Text +' ' ', ' '+ ComboBox5. Text +') '. Store. StoreRecInsert (instr); Endelsebegin//
If there is, you need the original number and the storage quantity together, and the inventory information in the table number changes as the result of the combined pro_num:=strtoint (pro_numed. Text) + selNum

Update store_info set store_info. STORE_PRO_NUM="' + inttostr (pro_num) + ' ' ' '+' where pro_code=' ' 'and' + ComboBox2. Text + 'place_code="' + ComboBox5. Text + ' ' ' '. Store. StoreRecUpdate (modstr); end;

CodePudding user response:

The building Lord, you should just do the warehouse management system,
From the point of programming, is no inventory record, a new inventory record;
Hold inventory record, I have to modify the additional number of inventory balance,
Middle may encounter the problem such as null, resulting in data errors,

Written as building Lord, is the most simple inventory method suitable for stand-alone applications,
Loading and unloading documents directly modify inventory balance sheet, according to
Good, simple algorithm does well,
Shortcomings, if many people operation, one entry receipt, another entry.besides,
So two people at the same time operating, the posterity covering the previous data, it is possible to,
So, directly change the data more dangerous! Deal with the irreversible!

May have warehouse table, table goods, for the single, inventory list (store_info),
Other tables (such as inventory list, check table) are omitted,

CodePudding user response:

refer to the eighth floor zck_yy response:
the building Lord, you should just do the warehouse management system,
From the point of programming, is no inventory record, a new inventory record;
Hold inventory record, I have to modify the additional number of inventory balance,
Middle may encounter the problem such as null, resulting in data errors,

Written as building Lord, is the most simple inventory method suitable for stand-alone applications,
Loading and unloading documents directly modify inventory balance sheet, according to
Good, simple algorithm does well,
Shortcomings, if many people operation, one entry receipt, another entry.besides,
So two people at the same time operating, the posterity covering the previous data, it is possible to,
So, directly change the data more dangerous! Deal with the irreversible!

May have warehouse table, table goods, for the single, inventory list (store_info),
Other tables (such as inventory list, check table) are omitted,


Update before you can use the transaction to lock, all data updated successfully finished (such as inventory, billing records) to submit the transaction, otherwise returns,
The transaction process, even if there are other terminal to update, all such transactions to finish can be, so there will not be unsafe data.

CodePudding user response:

Database transaction control, main atomic operation is to control the current filed,
Can't solve the problem of concurrent writes,

On the other hand, so many people that write directly balance sheets, is bad, there must be some reason,

CodePudding user response:

Agree with 7 floor, check the item does not exist, first, then check your pro_num variables, I see your update statement, equals pro_num directly, don't know what is your pro_num before the update value, could the pro_num is 0
  • Related