Skip to Content
Product Information
Author's profile photo ANKIT CHAUHAN

Israel_DeductibleTaxService in SAP Business One SDK

DeductibleTaxService in SAP Business One SDK enables you to add, look up, update and remove Deducted Purchase Tax Codes related data in ORTG table.

Deducted Purchase Tax Codes is specific to Israel (IL) localization. More details about Deducted Purchase Tax Codes can be found in the following blog post: https://blogs.sap.com/?p=1775261

In SAP Business One, Deducted Purchase Tax Codes – Setup is available under Administration → Setup → Financials → Tax → Deducted Purchase Tax Codes.

Below are some samples which you might find useful when using DeductibleTaxService in SAP Business One SDK:

  • Add a new Deducted Purchase Tax Code:
SAPbobsCOM.CompanyService oCompanyService = (SAPbobsCOM.CompanyService)oCompany.GetCompanyService();
SAPbobsCOM.DeductibleTaxService oDeductibleTaxService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.DeductibleTaxService);
SAPbobsCOM.DeductibleTax oDeductibleTax = oDeductibleTaxService.GetDataInterface(SAPbobsCOM.DeductibleTaxServiceDataInterfaces.dtsDeductibleTax);
oDeductibleTax.Code = "X1";
oDeductibleTax.Name = "X1 Name";
oDeductibleTax.DeductibleTaxRate = 18;
oDeductibleTax.Inactive = SAPbobsCOM.BoYesNoEnum.tNO;
var Add = oDeductibleTaxService.Add(oDeductibleTax);
  • Update an existing Deducted Purchase Tax Code:
SAPbobsCOM.CompanyService oCompanyService = (SAPbobsCOM.CompanyService)oCompany.GetCompanyService();
SAPbobsCOM.DeductibleTaxService oDeductibleTaxService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.DeductibleTaxService);
SAPbobsCOM.DeductibleTaxParams oDeductibleTaxParams = oDeductibleTaxService.GetDataInterface(SAPbobsCOM.DeductibleTaxServiceDataInterfaces.dtsDeductibleTaxParams);
SAPbobsCOM.DeductibleTax oDeductibleTax;
oDeductibleTaxParams.Code = "X1";
oDeductibleTax = oDeductibleTaxService.Get(oDeductibleTaxParams);
oDeductibleTax.Inactive = SAPbobsCOM.BoYesNoEnum.tYES;
oDeductibleTax.DeductibleTaxRate = 16;
oDeductibleTaxService.Update(oDeductibleTax);
  • Get all existing Deducted Purchase Tax Codes:
SAPbobsCOM.CompanyService oCompanyService = (SAPbobsCOM.CompanyService)oCompany.GetCompanyService();
SAPbobsCOM.DeductibleTaxService oDeductibleTaxService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.DeductibleTaxService);
SAPbobsCOM.DeductibleTaxParamsCollection oDeductibleTaxParamsCollection;
oDeductibleTaxParamsCollection = oDeductibleTaxService.GetList();
foreach (SAPbobsCOM.DeductibleTaxParams oDeductibleTaxParams in oDeductibleTaxParamsCollection)
{
    var Code = oDeductibleTaxParams.Code;
    var Name = oDeductibleTaxParams.Name;
}
  • Delete an existing Deducted Purchase Tax Code:
SAPbobsCOM.CompanyService oCompanyService = (SAPbobsCOM.CompanyService)oCompany.GetCompanyService();
SAPbobsCOM.DeductibleTaxService oDeductibleTaxService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.DeductibleTaxService);
SAPbobsCOM.DeductibleTaxParams oDeductibleTaxParams = oDeductibleTaxService.GetDataInterface(SAPbobsCOM.DeductibleTaxServiceDataInterfaces.dtsDeductibleTaxParams);
oDeductibleTaxParams.Code = "X1";
oDeductibleTaxService.Delete(oDeductibleTaxParams);

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.