public DataTable ExportDiscountInvoiceFormat(ArrayList ParameterList) { try { DBO.VAM121_DBO dbo = new VAM121_DBO(ref USEDB); return dbo.ExportDiscountInvoiceFormat(ParameterList); } catch (Exception ex) { throw ex; } }
/// <summary> // 功能說明:查詢進項憑證發票 //傳入值: //〔@發票日期起、迄〕 //〔@供應商代號起、迄〕 //〔@課稅別〕 //〔@入帳/折讓日期起、迄〕 //回傳值: //請參考WEB UI SPEC說明 //TABLE: //A=VDS_VAM _INVOICE_MAIN(進項發票主檔) //B=VDS_VAM_INVOICE_DETL(進項發票明細檔) //C= VDS_VAM_DIFF_INVOICE(物料差主檔) ////廠商驗收 //D=VDS_VGI_ACCEPT_MAIN(驗收主檔名稱) ////廠商退貨 //E=VDS_VGR_RETURN_MAIN(退貨單主檔) ////供應商主檔 //G= VDS_VDM_VENDOR //關聯: //A.INV_NO=B.INV_NO=C.INV_NO //A.VENDOR=C.VENDOR=G.VENDOR //IF B.SOURCE_TYPE=1 THEN ////廠商驗收 for 查出原進貨單金額 //B.SOURCE_NO=D.ACCEPT_NO //查詢欄位:NVL(TAX_REMAIN_AMT, UTAX_REMAIN_AMT) //ELSE IF B.SOURCE_TYPE=2 ////廠商退貨 for 查出原退貨單金額 //B.SOURCE_NO=E.RETURN_NO //查詢欄位:NVL(TAX_REMAIN_AMT, UTAX_REMAIN_AMT) //END IF ////查詢條件 //AND a.keyin_date BETWEEN NVL(〔@入帳日期起日〕 //,TO_DATE('19000101','yyyymmdd')) AND NVL(〔@入帳日期迄日〕,TO_DATE('29991230','yyyymmdd')) //AND a.inv_date BETWEEN NVL(〔@發票/折讓日期起日〕 //,TO_DATE('19000101','yyyymmdd')) AND NVL(〔@發票/折讓日期迄日〕 //,TO_DATE('29991230','yyyymmdd')) //AND a.tax_type = NVL(〔@課稅別〕,a.tax_type) //AND a.vendor BETWEEN NVL(〔@供應商代號起〕 //,' ') AND NVL(〔@供應商代號迄〕,'zzzzzzzzzz') //ORDER BY a.vendor,a.keyin_date,a.inv_date,a.inv_no,b.source_no; //說明: //1.ENABLE 欄為=1才可以被撈出,依照查詢條件回傳資料清單 //2.建議可以寫一隻DB function查詢進/退貨單原始單據金額。 /// </summary> public DataTable QueryPurchaseInvoice(ArrayList ParameterList) { try { DBO.VAM121_DBO dbo = new VAM121_DBO(ref USEDB); return dbo.doQueryPurchaseInvoice(ParameterList); } catch (Exception ex) { throw ex; } }