xj qian
2024-08-05 b8b0912fb9385f08c55e7055f37564c21e98fa50
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)
               {
@@ -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,12 +572,12 @@
         
         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 = xcombobox::GetCurSel(cbx_type.GetHWND());
         if (h < 0) return 1;
         xstring str = xcombobox::GetItemData(cbx_type.GetId());
         xstring str = xcombobox::GetItemData(cbx_type.GetHWND());
         arg.AddArg(L"ShipDays", str);
         trace(str);
         if (getUrl(L"/sale/data/AP/list101", arg.GetString(), x) != 1)
@@ -600,7 +598,7 @@
      int OnFilter()
      {
         xstring str = GetControl(L"sle_filter").GetText();
         xstring str = xcontrol(GetControl(L"sle_filter")).GetText();
         if (str != searchStr)
         {
            searchStr = str;