Beispiel #1
0
        public List <TaxItem> GetTax502563(int periodId, string glCode)
        {
            List <TaxItem> testData = new List <TaxItem>();
            TaxItem        taxItem  = new TaxItem();

            testData.Add(new TaxItem {
                TaxCode = "3B", TaxBase = (decimal) - 417650.00, TaxAmount = (decimal) - 29235.49, TaxAmtCalculated = (decimal) - 29235.49, TaxToPay = 0, Note = "Sample Note"
            });
            testData.Add(new TaxItem {
                TaxCode = "4Z", TaxBase = (decimal)2703357, TaxAmount = (decimal) - 144.83, TaxAmtCalculated = (decimal) - 144.83, TaxToPay = 0, Note = ""
            });
            return(testData);
        }
Beispiel #2
0
        public IHttpActionResult UpdateTaxItem(int id, TaxItem item)
        {
            var o = context.TaxItems.Find(item.Id);

            if (o == null)
            {
                return(NotFound());
            }

            context.TaxItems.AddOrUpdate(item);
            context.SaveChanges();
            return(Ok(item));
        }
 public List<TaxItem> AddPartyTaxItems(Check Check)
 {
     foreach (var Id in Check.items.Select(x => x.PartyId).Distinct())
     {
         double itemTotal = 0;
         TaxItem taxItem = new TaxItem();
         foreach (var row in Check.items.Where(y => y.PartyId == Id))
         {
             itemTotal += row.Price;
         }
         taxItem.PartyId = Id;
         taxItem.DinerId = 0;
         taxItem.ItemTotal = itemTotal;
         taxItem.TaxAmount = Math.Round((itemTotal * Check.CheckTaxPercentage), 2);
         taxItem.TaxPercent = Check.CheckTaxPercentage;
         taxItem.Diviser = 1;
         partyTaxItems.Add(taxItem);
     }
     return partyTaxItems;
 }
Beispiel #4
0
        public List <TaxItem> GetTax502009(int periodId, string glCode)
        {
            List <TaxItem> testData = new List <TaxItem>();
            TaxItem        taxItem  = new TaxItem();

            testData.Add(new TaxItem {
                TaxCode = "A2", TaxBase = (decimal)2596710.77, TaxAmount = (decimal) - 181282.46, S4CalcAmount = 0, TaxToPay = (decimal) - 181282.45, Note = ""
            });
            testData.Add(new TaxItem {
                TaxCode = "A4", TaxBase = (decimal)3931382.96, TaxAmount = (decimal) - 275196.69, S4CalcAmount = 0, TaxToPay = (decimal) - 275198.69, Note = ""
            });
            testData.Add(new TaxItem {
                TaxCode = "P4", TaxBase = (decimal)3782591.06, TaxAmount = (decimal) - 264781.43, S4CalcAmount = 0, TaxToPay = (decimal) - 264781.43, Note = ""
            });
            testData.Add(new TaxItem {
                TaxCode = "S4", TaxBase = (decimal)352583.82, TaxAmount = (decimal) - 13222.10, S4CalcAmount = (decimal)11893.01, TaxToPay = (decimal) - 11893.01, Note = ""
            });
            testData.Add(new TaxItem {
                TaxCode = "S4", TaxBase = (decimal)8889381.43, TaxAmount = (decimal)873.82, S4CalcAmount = 0, TaxToPay = 0, Note = ""
            });
            return(testData);
        }
Beispiel #5
0
 public IHttpActionResult AddTaxItem(int id, TaxItem item)
 {
     context.TaxItems.AddOrUpdate(item);
     context.SaveChanges();
     return(Ok(item));
 }