本文整理汇总了C#中Invoice.setHeader方法的典型用法代码示例。如果您正苦于以下问题:C# Invoice.setHeader方法的具体用法?C# Invoice.setHeader怎么用?C# Invoice.setHeader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invoice
的用法示例。
在下文中一共展示了Invoice.setHeader方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createInvoice
public static Invoice createInvoice ()
{
ZfDate today = new ZfDateDay ();
ZfDate nextMonth = new ZfDateMonth (DateUtils.addMonths (today, 1));
Invoice invoice = new Invoice (ConformanceLevel.BASIC); // <1>
invoice.setHeader(new Header()
.setInvoiceNumber("20131122-42")
.setCode(DocumentCode._380)
.setIssued(today)
.addNote(new Note("MFG"))
.setName ("Rechnung"));
Trade trade = new Trade ();
trade.setAgreement (new Agreement () // <2>
.setSeller (new TradeParty ()
.setName ("Seller Inc.")
.setAddress (new Address ("80331", "Marienplatz 1", "München", Country.DE))
.addTaxRegistrations (new TaxRegistration ("DE122...", Reference.FC)))
.setBuyer (new TradeParty ()
.setName ("Buyer Inc.")
.setAddress (new Address ("50667", "Domkloster 4", "Köln", Country.DE))
.addTaxRegistrations (new TaxRegistration ("DE123...", Reference.FC))));
trade.setDelivery (new Delivery (nextMonth));
trade.setSettlement (new Settlement ()
.setPaymentReference ("20131122-42")
.setCurrency (Currency.EUR)
.addPaymentMeans (new PaymentMeans ()
.setPayeeAccount (new CreditorFinancialAccount ("DE01234.."))
.setPayeeInstitution (new FinancialInstitution ("GENO...")))
.setMonetarySummation (new MonetarySummation ()
.setLineTotal (new Amount (100, Currency.EUR))
.setChargeTotal (new Amount (0, Currency.EUR))
.setAllowanceTotal (new Amount (0, Currency.EUR))
.setTaxBasisTotal (new Amount (100, Currency.EUR))
.setTaxTotal (new Amount (19, Currency.EUR))
.setGrandTotal (new Amount (119, Currency.EUR))));
trade.addItem (new Item ()
.setProduct (new Product ().setName ("Saddle"))
.setDelivery (new SpecifiedDelivery (new Quantity (1, UnitOfMeasurement.UNIT))));
invoice.setTrade (trade);
return invoice;
}