On Monday, August 28, 2017 at 2:50:29 PM UTC-7, 黄祥 wrote:
>
> my current models
> db.define_table('sale_order', 
> Field('sale_order_no'), 
> Field('sale_order_date', 'date'),
> Field('customer', 'reference customer'), 
> Field('product', 'reference product'), 
> Field('quantity', 'integer'),
> Field('price', 'double'),
> Field('total_price', 'double'),
> Field('grand_total', 'double'),
> Field('discount_percentage', 'double'),
> Field('discount_nominal', 'double'),
> Field('tax_percentage', 'double'),
> Field('tax_nominal', 'double'),
> Field('service_tax_percentage', 'double'),
> Field('service_tax_nominal', 'double'),
> Field('grand_total_net', 'double'),
> Field('total_paid', 'double'),
> Field('paid_return', 'double'),
> format = '%(sale_order_no)s')
>
> db.define_table('cash_in', 
> Field('cash_in_no'), 
> Field('cash_in_date', 'date'),
> Field('transaction_no'), 
> Field('chart_of_account', 'reference chart_of_account'), 
> Field('amount', 'double'), 
> Field('discount', 'double'), 
> Field('place', 'reference chart_of_account'), 
> format = '%(cash_in_no)s')
>
> db.define_table('cash_out', 
> Field('cash_out_no'), 
> Field('cash_out_date', 'date'),
> Field('transaction_no'), 
> Field('chart_of_account', 'reference chart_of_account'), 
> Field('amount', 'double'), 
> Field('discount', 'double'), 
> Field('place', 'reference chart_of_account'), 
> format = '%(cash_out_no)s')
>
> i usually divide table order as :
> - header (for field order_no, order, date, customer, etc except the 
> product ordered) 
> - detail (for field product, qty, price, total price)
> now i combine it into 1 table, so that user can see the the header and 
> detail in 1 sqlform grid table (frontend)
> but sometime in 1 transaction user will have multiple payment (cash_in), 
> costs (cash_out) and tax (cash_out)
> so i want to combine the 3 table above into 1 single grid view
> just don't know how to do either redefine my table or use js framework for 
> view, tried sqlform.grid with left join before but the search is contain of 
> repeated table fields.
>
> thanks and best regards,
> stifan
>


This is useful detail, but by "sketch" I was thinking of some sort of 
mock-up of what the user would on the screen.

/dps
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to