public ActionResult TestA0101() { InvoiceA0101 model = new InvoiceA0101() { // Main InvoiceNumber = "QE00000000", InvoiceDate = "20210419", InvoiceTime = "16:20:17", SellerIdentifier = "12345678", SellerName = "測試股份有限公司", BuyerIdentifier = "0000000000", BuyerName = "測試購買者", InvoiceType = "07", DonateMark = "0", // Amount SalesAmount = "100", TaxType = "1", TaxRate = "0.05", TaxAmount = "5", TotalAmount = "105" }; // Details model.ProductItems = new List <InvoiceA0101ProductItem>(); model.ProductItems.Add(new InvoiceA0101ProductItem() { Description = "測試品項", Quantity = "1", Unit = "個", UnitPrice = "100", Amount = "100", SequenceNumber = "1" }); InvoiceXMLServices service = new InvoiceXMLServices(); return(Content(service.GeneratorA0101(model), "text/xml")); }
/// <summary> /// 開立發票訊息規格 /// </summary> /// <param name="data"></param> /// <returns></returns> public string GeneratorA0101(InvoiceA0101 data) { return(this.GeneratorXML(data, @"~/einv/template/templateA0101.txt", "urn:GEINV:eInvoiceMessage:A0101:3.2", @"~/einv/xsd/v32/A0101.xsd")); }