mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 14:37:16 +00:00
Export amazon settlement report fix
This commit is contained in:
@@ -39,6 +39,7 @@ namespace bnhtradeScheduledTasks
|
||||
Console.WriteLine("<1> Amazon reports");
|
||||
Console.WriteLine("<2> Stock functions");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("<8> Start scheduled nightly tasks");
|
||||
Console.WriteLine("<9> Dev functions");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("<0> Exit");
|
||||
@@ -59,7 +60,8 @@ namespace bnhtradeScheduledTasks
|
||||
Console.WriteLine(consoleHeader);
|
||||
Console.WriteLine("Main Menu > Amazon Reports");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("<1> Update all Amazon inventory and settlement data");
|
||||
Console.WriteLine("<1> Start nightly tasks");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("<2> Update FBA Inventory Data");
|
||||
Console.WriteLine("<3> Update FBA Inventory Age Data");
|
||||
Console.WriteLine("<4> Update Amazon Settlement Data");
|
||||
@@ -105,9 +107,9 @@ namespace bnhtradeScheduledTasks
|
||||
{
|
||||
Console.Clear();
|
||||
var task = new AmazonReport();
|
||||
var task2 = new StockReconciliation();
|
||||
var task2 = new bnhtrade.Core.Logic.Export.AmazonSettlementData(sqlConnectionString);
|
||||
task.UpdateAmazonSettlementData(sqlConnectionString);
|
||||
task2.WIP_ProcessAmazonSettlementData(sqlConnectionString);
|
||||
task2.ToInvoice();
|
||||
Console.WriteLine("Complete, press any key to continue...");
|
||||
Console.ReadKey();
|
||||
}
|
||||
@@ -265,6 +267,13 @@ namespace bnhtradeScheduledTasks
|
||||
|
||||
} while (true);
|
||||
}
|
||||
else if (input == "8")
|
||||
{
|
||||
Console.Clear();
|
||||
DownloadAll();
|
||||
Console.WriteLine("Complete, press any key to continue...");
|
||||
Console.ReadKey();
|
||||
}
|
||||
else if (input == "9")
|
||||
{
|
||||
do
|
||||
@@ -281,7 +290,7 @@ namespace bnhtradeScheduledTasks
|
||||
Console.WriteLine("<6> Test Owner intro insert");
|
||||
Console.WriteLine("<7> Currency exchange rate insert");
|
||||
Console.WriteLine("<8> SQL Loop function");
|
||||
Console.WriteLine("<9> Inbound shipment test");
|
||||
Console.WriteLine("<9> AUTOEXEC TEST");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("<0> Back");
|
||||
Console.WriteLine("");
|
||||
@@ -398,9 +407,7 @@ namespace bnhtradeScheduledTasks
|
||||
{
|
||||
Console.Clear();
|
||||
|
||||
var bob = new bnhtrade.Core.Test.InboundShipmentInfo(sqlConnectionString);
|
||||
bob.Test();
|
||||
|
||||
var inst = new bnhtrade.Core.Test.AutoExec(sqlConnectionString);
|
||||
|
||||
Console.WriteLine("Complete, press any key to continue...");
|
||||
Console.ReadKey();
|
||||
@@ -462,6 +469,7 @@ namespace bnhtradeScheduledTasks
|
||||
|
||||
var account = new AmazonReport();
|
||||
var stock = new StockReconciliation();
|
||||
var export = new bnhtrade.Core.Logic.Export.AmazonSettlementData(sqlConnectionString);
|
||||
|
||||
bool accountUpdate = false;
|
||||
bool stockUpdate = false;
|
||||
@@ -474,9 +482,9 @@ namespace bnhtradeScheduledTasks
|
||||
try
|
||||
{
|
||||
if (accountUpdate == false) { accountUpdate = true; account.UpdateAmazonSettlementData(sqlConnectionString); }
|
||||
if (accountProcess == false) { accountProcess = true; export.ToInvoice(); }
|
||||
if (stockUpdate == false) { stockUpdate = true; stock.UpdateFbaStockImportData(sqlConnectionString); }
|
||||
|
||||
if (accountProcess == false) { accountProcess = true; stock.WIP_ProcessAmazonSettlementData(sqlConnectionString); }
|
||||
// if (stockProcess == false) { stockProcess = true; stock.ProcessFbaStockImportData(); }
|
||||
// ^^^^^^ best to process manually, case, fba inventory recepts, if a correction is made days later (ie -1) the already incorrect value
|
||||
// will have been entered in the stocktransaction table and maked as processed in the inventoryreceipt table
|
||||
|
||||
Reference in New Issue
Block a user