Answer the question
In order to leave comments, you need to log in
How to create a nested list form?
I use StofDoctrineExtensionsBundle to work with the tree, everything was not bad until I needed to build a nested list for editing, and here I don’t even know where to start, well, to be more precise, if you take it and just output it without using the form class, then it didn’t go anywhere else , but I think maybe there is some option to do this through the form class?
The list with editing will look something like this
. Is it possible to somehow build such a form through CollectionType or maybe I need to use something else?
Answer the question
In order to leave comments, you need to log in
As one plumber used to say: "yes, the whole system needs to be changed here."
Normally, without a receipt document, bags of cement in the free balance should not have appeared at all.
negative balances. A bad example is with bags of cement. There are warehouses with products and there may be negative balances. Somehow it is possible to calculate one (maximum two) cost price requests for sales with a new invoice
How could you sell something that was not in stock? Where did the product come from?
The word "cost" is not suitable here, since it must take into account not only the entry price, but also the costs of delivery and sale.
Cleverly, batch accounting is done when not just ten bags of cement are stored, but three bags from batch XXX, at an entrance price of 100 rubles, five bags from batch YYY at a price of 101 rubles, two bags from batch ZZZ at a price of 110 rubles. Then, when selling them, you can accurately calculate the delta.
To begin with, take an interest in the rules in your company, the theory of warehouse accounting, etc.
We somehow wrote a warehouse accounting system and there was an interesting nuance.
Example:
In March, the warehouse received 10 bags. They brought them to the base. In April, it turned out that not 10, but 15 sacks were received in March, 5 more sacks were brought in, and the date of receipt was set to March. But since the reporting period for March is closed, it should be deduced that 10 bags were received in March. Moreover, they are also not listed as received in April, because they arrived in March, but at the same time they are taken into account in the total current quantity in the warehouse. And there were several such jokes.
Accounting and warehouse accounting often contain nuances that cause programmers to break the pattern.
Well, or the problem is in the people who set the task this way.
Ask an accountant, storekeeper or whoever will use this system there, and design the base based on this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question