Description
Standard Audit File-Tax (SAF-T) product types according to the Portuguese tax authority.
Field name: ProdctType.
Property type
Read-write property
Syntax
Remarks
Example
| C# | Copy Code |
|---|
int errCode; string errMsg; SAPbobsCOM.Items oItem = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems); if (oItem.GetByKey(""I001"")) { Console.WriteLine(""Item Old Value: "" + oItem.SAFTProductType.ToString()); oItem.SAFTProductType = SAFTProductTypeEnum.saftpt_Other; errCode = oItem.Update(); if (errCode != 0) { Console.WriteLine(""Update Item Error: "" + errCode); return; } } SAPbobsCOM.AdditionalExpenses oFreight = (SAPbobsCOM.AdditionalExpenses)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oAdditionalExpenses); if (oFreight.GetByKey(3)) { Console.WriteLine(""Freight Old Value: "" + oFreight.FreightType.ToString()); Console.WriteLine(""Freight Old Value: "" + oFreight.SAFTProductType.ToString()); oFreight.SAFTProductType = SAFTProductTypeEnum.saftpt_Products; errCode = oFreight.Update(); if (errCode != 0) { Console.WriteLine(""Update Freight Error: "" + errCode); return; } } SAPbobsCOM.JournalEntries oJE = (SAPbobsCOM.JournalEntries)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries); if (oJE.GetByKey(2591)) { Console.WriteLine(""Journal Entry Old Value: "" + oJE.SAFTTransactionType.ToString()); oJE.SAFTTransactionType = SAFTTransactionTypeEnum.safttt_MeasurementofResults; errCode = oJE.Update(); if (errCode != 0) { Console.WriteLine(""Update Journal Entry Error: "" + errCode); return; } } SAPbobsCOM.VatGroups oVG = (SAPbobsCOM.VatGroups)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oVatGroups); if (oVG.GetByKey(""D0"")) { Console.WriteLine(""Vat Group Old Value: "" + oVG.SAFTTaxCode.ToString()); oVG.SAFTTaxCode = SAFTTaxCodeEnum.safttc_MiddleTax; errCode = oVG.Update(); if (errCode != 0) { Console.WriteLine(""Update Vat Group Error: "" + errCode); return; } } |
|
See Also