Home > Back-end >  Manufacturer replenish onr's stock counts
Manufacturer replenish onr's stock counts

Time:09-22

Each version, I have a stock, a stock out, at present there is a problem,
I want to query the same manufacturer, if no return information is displayed for five consecutive times,
But if there are times you need to recalculate the return data, want to please everybody version of guidance,
Need to think from where aspects, thank you!

CodePudding user response:

1, the establishment of a return of the table, save return information;
2, regular search, return table, through the Select designated units, date, goods name, when Rount is greater than 5, we show that processing...

CodePudding user response:

Build a table
Returns the article number number

When return to return number of + 1
When the stock returns zero times

Information table and new table joins again according to a number of conditions

CodePudding user response:

Upstairs is the solution, the original poster is to test for a return of the 5 times in a row, rather than total return
5 times
I think
Table "into the return records"
Field of replenish onr's stock symbol returns
For example 1 0
1 1 1 is replenish onr's stock, returns success
Adoquery1. SQL. Add mark (select stock return form "into the return record")
Adoquery1. First//starting from the first stock
If return mark=0 then I=I + 1;//I for the counter variable
Else I:=0; As long as in return I will reset to 0
If I=5 then no return exit 5 times in a row
Else did not return to happen 5 times in a row,
Adoquery1. Next

  • Related