ERP encounters the business logic problem, asks the thought

Source: Internet
Author: User
I am now working on an ERP system and encountering a problem.
Example: Table A has fields
ID1 CNAME Necklace Number 3 Iseku 0

All we have to do is to give each order a number of different serial numbers to track the direction of each shipment,
That this field I will loop out on the page 3 lines, assign them one out of the library serial number, when I click the first row out of the library button, Iseku Update to 1 means out of the library. The bottom 2 of the state will become out of the library, then I will not be the next 2 lines out of the library, the library will reduce the number of another commodity inventory table, the number of 3 is not reduced.


To be blunt, it is how to mark each quantity of a row of records separately!! Tokyu


Reply to discussion (solution)

Iseku can be remembered as 0,1,2,3,4 ....
Indicate the position of the item in circulation, respectively.

A table ID CNAME number ISEKU status time
1 Mobile 5 Warehousing 0 XX
1 Mobile 2 out of stock 1 XX
1 Mobile 1 out of stock 1 XX
1 Mobile 1 Transfers 2 XX


can satisfy status = 0 indicates the status of the inbound state = 1 indicates the out-of-Library
If there is a transfer, you only need to add a status flag to the status

Iseku can be remembered as 0,1,2,3,4 ....
Indicate the position of the item in circulation, respectively.


I think you may not understand my business needs.



Obviously you also need a table organized by order, the logistics status is recorded in his
and your Inventory list (table A) is just a record of the inventory quantity

Well, the boss changed the business logic, thank you.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.