1 #line 2 "src/Eng/InvoicesModel.cpp"
8 :
Wt::Dbo::QueryModel<
GCW::Dbo::Invoices::Item::Ptr >()
15 InvoicesModel(
const std::vector< Wt::WFormModel::Field > & _fields )
16 :
Wt::Dbo::QueryModel<
GCW::Dbo::Invoices::Item::Ptr >(),
27 m_customerGuid = _guid;
44 if(
GCW::app()-> gnucashew_session().isOpen() )
46 Wt::Dbo::Transaction t(
GCW::app()-> gnucashew_session() );
48 if( m_customerGuid ==
"" )
54 std::cout << __FILE__ <<
":" << __LINE__
55 <<
" " << m_customerGuid
56 <<
" " << results.resultList().size()
66 .where(
"owner_guid = ? OR owner_guid in (select guid from jobs where owner_guid = ?)" )
69 .bind( m_customerGuid )
70 .bind( m_customerGuid )
73 std::cout << __FILE__ <<
":" << __LINE__
74 <<
" " << m_customerGuid
75 <<
" " << results.resultList().size()
83 if( m_fields.size() > 0 )
85 for(
auto field : m_fields )
91 addAllFieldsAsColumns();
96 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << rowCount() << std::endl;
auto setCustomerGuid(const std::string &_guid) -> void
auto refreshFromDisk() -> void
Refresh From Disk.