| | |
| | | #include <wobject/xstring.hpp> |
| | | #include <xcontrol/xtreeview.hpp> |
| | | #include <xcontrol/xdwgrid.hpp> |
| | | #include <wobject/xdouble.hpp> |
| | | #include <xcontrol/xlayersheet.hpp> |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | |
| | | { |
| | | double Amount1 = dw_3.GetItemDouble(hdr.row, L"Amount"); |
| | | double PrePayAmount = dw_3.GetItemDouble(hdr.row, L"PrePayAmount"); |
| | | dw_3.SetItemDouble(hdr.row, L"PayedAmount", (Amount - PrePayAmount).round(2)); |
| | | dw_3.SetItemDouble(hdr.row, L"PayedAmount", xdouble(Amount - PrePayAmount).round(2)); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | /*}*/ |
| | | if (inserted) |
| | | { |
| | | xstring sdate = win32::GetLocalDate(); |
| | | xstring sdate = publiccode::GetCurrentDate(); |
| | | dw_3.SetItemString(row, L"APDate", sdate); |
| | | |
| | | dw_3.SetItemString(row, L"CreateDate", sdate); |
| | |
| | | index++; |
| | | if (index == 1) |
| | | { |
| | | GetControl(L"sle_filter").SetText(L""); |
| | | xcontrol(GetControl(L"sle_filter")).SetText(L""); |
| | | xstring str = L""; |
| | | if (str != searchStr) |
| | | { |
| | |
| | | else if (comdid == L"xmFilter") return OnFilter(); |
| | | else if (comdid == L"xmQuery") |
| | | { |
| | | |
| | | |
| | | index = m_layer.GetSheetIndex(); |
| | | index++; |
| | | OnRetrieve(); |
| | |
| | | int row = hdr.row; |
| | | |
| | | OnPrepayRetrieve(row, bstart); |
| | | xml x = ViewObject::RetrieveData(L"/sale/data/AP/list/invoice/supplier", L"InvoiceNo", dw_1.GetItemString(row, L"InvoiceNo"), |
| | | "SupplierID", dw_1.GetItemString(row, L"SupplierID")); |
| | | xml x = ViewObject::RetrieveData(GetServerUrl(), L"/sale/data/AP/list/invoice/supplier", L"InvoiceNo", dw_1.GetItemString(row, L"InvoiceNo"), |
| | | L"SupplierID", dw_1.GetItemString(row, L"SupplierID")); |
| | | if (x) dw_101.Retrieve(x); |
| | | |
| | | dw_2.Redraw(); |
| | |
| | | if (NInvoiceNo != InvoiceNo) |
| | | { |
| | | hdr.mask = DMS_CSSSTYLE; |
| | | hdr.cssstyle = L"color:#ff0000"; |
| | | hdr.pCssStyle = (LPTSTR)L"color:#ff0000"; |
| | | } |
| | | } |
| | | return 1; |
| | |
| | | KXMLDOMElement e = lst.item(i); |
| | | docElement.appendChild(e); |
| | | KXMLDOMElement fe = x1.createElement(L"FilterColumn"); |
| | | fe.text = filterStr; |
| | | fe.settext(filterStr); |
| | | e.appendChild(fe); |
| | | fe.Release(); |
| | | e.Release(); |
| | | } |
| | | docElement.Release(); |
| | | lst.Release(); |
| | | dw_2.Retrieve(x1); |
| | | } |
| | | else |
| | |
| | | |
| | | xaserverarg arg; |
| | | |
| | | arg.AddArg(L"QueryTxt", GetControl(L"sle_search").GetText()); |
| | | arg.AddArg(L"QueryTxt", xcontrol(GetControl(L"sle_search")).GetText()); |
| | | |
| | | xcombobox cbx_type = GetControl(L"cbx_ship"); |
| | | int h = xcombobox::GetCurSel(cbx_type.GetId()); |
| | | int h = cbx_type.GetCurSel(); |
| | | if (h < 0) return 1; |
| | | xstring str = xcombobox::GetItemData(cbx_type.GetId()); |
| | | xstring str = (string)cbx_type.GetItemData(h); |
| | | arg.AddArg(L"ShipDays", str); |
| | | trace(str); |
| | | |
| | | if (getUrl(L"/sale/data/AP/list101", arg.GetString(), x) != 1) |
| | | { |
| | | trace(x.text()); |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | dw_1.Retrieve(x); |
| | | dw_1.Redraw(); |
| | | } |
| | |
| | | |
| | | int OnFilter() |
| | | { |
| | | xstring str = GetControl(L"sle_filter").GetText(); |
| | | xstring str = xcontrol(GetControl(L"sle_filter")).GetText(); |
| | | if (str != searchStr) |
| | | { |
| | | searchStr = str; |