mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 06:27:15 +00:00
Feature: stock replenishment
This commit is contained in:
26
src/bnhtrade.Core/Test/Amazon/Amazon.cs
Normal file
26
src/bnhtrade.Core/Test/Amazon/Amazon.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Test.Amazon
|
||||
{
|
||||
public class Amazon
|
||||
{
|
||||
public Amazon()
|
||||
{
|
||||
var stock = new Stock();
|
||||
stock.GetReplenishmentList();
|
||||
}
|
||||
|
||||
public class Stock
|
||||
{
|
||||
public void GetReplenishmentList()
|
||||
{
|
||||
var read = new bnhtrade.Core.Logic.Amazon.Fba.Stock();
|
||||
var resut = read.GetReplenishmentList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using bnhtrade.Core.Data.Database.Stock;
|
||||
|
||||
namespace bnhtrade.Core.Test.Stock
|
||||
{
|
||||
@@ -11,8 +12,9 @@ namespace bnhtrade.Core.Test.Stock
|
||||
public Stock()
|
||||
{
|
||||
// method you want to start here
|
||||
|
||||
ReadStockStatus();
|
||||
}
|
||||
|
||||
public void ReadStatusBalance()
|
||||
{
|
||||
var result = new bnhtrade.Core.Data.Database.Stock.ReadStatusTransaction()
|
||||
@@ -26,7 +28,15 @@ namespace bnhtrade.Core.Test.Stock
|
||||
var atDate = new DateTime(2017, 02, 01, 21, 54, 30);
|
||||
DateTime.TryParse("22/12/2017 16:35:58", out atDate);
|
||||
|
||||
var result = new Core.Logic.Stock.StatusBalance().GetBySku(sku, statusId);
|
||||
var result = new Core.Logic.Stock.StatusBalance().GetStatusBalance(sku, statusId);
|
||||
int i = 0;
|
||||
}
|
||||
public void StatusBalance2()
|
||||
{
|
||||
int statusId = 16; // Inventory, Reserved (Garage Stock)
|
||||
var result = new Core.Logic.Stock.StatusBalance().GetSkuQuantity(statusId);
|
||||
int i = result.Values.ToList().Sum();
|
||||
int y = 0;
|
||||
}
|
||||
|
||||
public void ReadStockId()
|
||||
@@ -47,5 +57,14 @@ namespace bnhtrade.Core.Test.Stock
|
||||
{
|
||||
new bnhtrade.Core.Logic.Stock.SkuTransactionReconcile().UnReconcileTransaction(transactoinId);
|
||||
}
|
||||
|
||||
public void ReadStockStatus()
|
||||
{
|
||||
var db = new Status();
|
||||
db.StatusIds = new List<int> { 3, 4, 5, 6, 7, 11, 12, 13, 15 };
|
||||
db.StatusTypeIds = new List<int> { 12, 5 };
|
||||
var result = db.Read();
|
||||
int i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user