LiFan
7 天以前 d4726c427464d5fa50c9fce848831c4cec36d8d1
jrj/project/business/AP/APNew3.warizd.cpp
@@ -1,6 +1,8 @@
#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"
@@ -79,7 +81,7 @@
         {
            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;
      }
@@ -112,7 +114,7 @@
            /*}*/
            if (inserted)
            {
               xstring sdate = win32::GetLocalDate();
               xstring sdate = publiccode::GetCurrentDate();
               dw_3.SetItemString(row, L"APDate", sdate);
               dw_3.SetItemString(row, L"CreateDate", sdate);
@@ -351,7 +353,7 @@
            index++;
            if (index == 1)
            {
               GetControl(L"sle_filter").SetText(L"");
               xcontrol(GetControl(L"sle_filter")).SetText(L"");
               xstring str = L"";
               if (str != searchStr)
               {
@@ -378,7 +380,7 @@
         else if (comdid == L"xmFilter")  return OnFilter();
         else if (comdid == L"xmQuery")
         {
            index = m_layer.GetSheetIndex();
            index++;
            OnRetrieve();
@@ -429,8 +431,8 @@
         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();
@@ -459,7 +461,7 @@
            if (NInvoiceNo != InvoiceNo)
            {
               hdr.mask = DMS_CSSSTYLE;
               hdr.cssstyle = L"color:#ff0000";
               hdr.pCssStyle = (LPTSTR)L"color:#ff0000";
            }
         }
         return 1;
@@ -547,13 +549,9 @@
                     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
@@ -574,14 +572,14 @@
         
         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());
@@ -590,6 +588,7 @@
         }
         else
         {
            dw_1.Retrieve(x);
            dw_1.Redraw();
         }
@@ -600,7 +599,7 @@
      int OnFilter()
      {
         xstring str = GetControl(L"sle_filter").GetText();
         xstring str = xcontrol(GetControl(L"sle_filter")).GetText();
         if (str != searchStr)
         {
            searchStr = str;