0

i'm using cakephp 3.0.

lets say that i have a form that represents an invoice and the invoice items. the invoice has many invoice items relation. the form has some inputs for the invoice, and 10 rows with inputs for the invoice items: item code, item qty, item price, etc...

The invoice has his own model/controller, also the invoice item has his own model/controller.

Not always all the 10 rows are filled with invoice items and you do not wants that the validation rules be applied to these rows that are not used. the question is, what is the best approach to accomplish this?

2
  • You may want to further elaborate what exactly "rows" are (each row = 1 invoice with multiple inputs?).
    – ndm
    Dec 30, 2015 at 13:44
  • Hello, the rows are the items that are included on the invoice, i mean, every different item that is included in the invoice goes to his invoice item row. invoice and invoice item are different models and controllers Dec 30, 2015 at 17:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.