Added invoice export function and started implementation of unitofwork pattern (#43)

* complete read invoices from db

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* updated nuget package spapi

* WIP

* wip, now test

* wip, jut need to fix tax inclusive line amounts not supported

* wip

* wip, before I f everything up

* no, it complies now, this is the one before I f everything up

* wip

* wip

* wip, logic ready for testing

* wip it builds!!!!

* wip tested, working, need to complete the gui section

* wip

* wip

* wip - created export invoice data delete, time for testing

* wip testing phase

* wip - delete function fully tested and working

* wip on to sorting out the issue with settlement invoices not tallying

* wip

* wip

* wip

* wip

* wip before I complete change the ReadInvoiceLineItem sections

* that appears to have worked, on with the main quest

* no it's doesn't work, saving before i remove the confusing cache system (just use a dictionary!!)

* wipping picadilli

* wip

* wip

* implemented uow on inovice export, now for testing

* wip

* wip all tested do invoice currency convertion fearure

* wip

* pretty much done so long as xero accepts the exported invoices

* Complete!
This commit is contained in:
Bobbie Hodgetts
2025-06-26 23:29:22 +01:00
committed by GitHub
parent 8bbf885a48
commit 29f9fae508
82 changed files with 4606 additions and 2837 deletions
@@ -163,7 +163,7 @@ namespace bnhtrade.Core.Data.Amazon.Feeds
GetFeedDetails(feedID);
}
public void SubmitFeedPRICING(double PRICE, string SKU)
public void SubmitFeedPRICING(decimal price, string SKU)
{
ConstructFeedService createDocument = new ConstructFeedService(amazonConnection.GetCurrentSellerID, "1.02");
@@ -175,7 +175,7 @@ namespace bnhtrade.Core.Data.Amazon.Feeds
StandardPrice = new StandardPrice()
{
currency = amazonConnection.GetCurrentMarketplace.CurrencyCode.ToString(),
Value = (PRICE).ToString("0.00")
Value = price
}
});
createDocument.AddPriceMessage(list);
@@ -201,14 +201,14 @@ namespace bnhtrade.Core.Data.Amazon.Feeds
StandardPrice = new StandardPrice
{
currency = currencyCode,
Value = price.ToString("0.00")
Value = price
},
Sale = new Sale
{
SalePrice = new StandardPrice
{
currency = currencyCode,
Value = salePrice.ToString("0.00")
Value = salePrice
},
StartDate = startDate.ToUniversalTime().ToString("yyyy-MM-dd'T'HH:mm:ss.fffK"),
EndDate = endDate.ToUniversalTime().ToString("yyyy-MM-dd'T'HH:mm:ss.fffK")
@@ -224,7 +224,7 @@ namespace bnhtrade.Core.Data.Amazon.Feeds
}
public void SubmitFeedSale(double PRICE, string SKU)
public void SubmitFeedSale(decimal price, string SKU)
{
ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
@@ -236,7 +236,7 @@ namespace bnhtrade.Core.Data.Amazon.Feeds
StandardPrice = new StandardPrice()
{
currency = amazonConnection.GetCurrentMarketplace.CurrencyCode.ToString(),
Value = (PRICE).ToString("0.00")
Value = price
},
Sale = new Sale()
{
@@ -245,7 +245,7 @@ namespace bnhtrade.Core.Data.Amazon.Feeds
SalePrice = new StandardPrice()
{
currency = amazonConnection.GetCurrentMarketplace.CurrencyCode.ToString(),
Value = (PRICE - 10).ToString("0.00")
Value = price
}
}
});
@@ -32,7 +32,7 @@ namespace bnhtrade.Core.Data.Amazon.Report
reportIdList.Add(report.ReportId);
}
UI.Console.WriteLine("{0} Settlement reports avaible on Amazon SP-API");
UI.Console.WriteLine(reportIdList.Count().ToString() + " Settlement reports avaible on Amazon SP-API");
return reportIdList;
}