mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 14:37:16 +00:00
wip
This commit is contained in:
@@ -8,6 +8,16 @@ namespace bnhtrade.Core.Data.Database
|
|||||||
{
|
{
|
||||||
public static class Constants
|
public static class Constants
|
||||||
{
|
{
|
||||||
|
public static string GetMarginSchemeTaxCode()
|
||||||
|
{
|
||||||
|
return "T190";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetOrderChannelAmazonUk()
|
||||||
|
{
|
||||||
|
return "Amazon.co.uk";
|
||||||
|
}
|
||||||
|
|
||||||
public static int GetProductConditionIdNew()
|
public static int GetProductConditionIdNew()
|
||||||
{
|
{
|
||||||
return 10;
|
return 10;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace bnhtrade.Core.Logic.Sku.Price
|
|||||||
private string sqlConnectionString;
|
private string sqlConnectionString;
|
||||||
private bnhtrade.Core.Logic.Log.LogEvent log = new Log.LogEvent();
|
private bnhtrade.Core.Logic.Log.LogEvent log = new Log.LogEvent();
|
||||||
string err = "FbaPricing Error: ";
|
string err = "FbaPricing Error: ";
|
||||||
private string marginSchemeTaxCode = "T190";
|
private string marginSchemeTaxCode = Data.Database.Constants.GetMarginSchemeTaxCode();
|
||||||
int repriceHoldOnSalePeriod = 14; // days
|
int repriceHoldOnSalePeriod = 14; // days
|
||||||
private int newConditionId = Data.Database.Constants.GetProductConditionIdNew();
|
private int newConditionId = Data.Database.Constants.GetProductConditionIdNew();
|
||||||
private List<Model.Sku.Price.SkuPriceParameter> skuInfo;
|
private List<Model.Sku.Price.SkuPriceParameter> skuInfo;
|
||||||
@@ -41,7 +41,7 @@ namespace bnhtrade.Core.Logic.Sku.Price
|
|||||||
|
|
||||||
using (var scope = new TransactionScope())
|
using (var scope = new TransactionScope())
|
||||||
{
|
{
|
||||||
string orderChannel = "Amazon.co.uk"; // may in future enable other order channels
|
string orderChannel = Data.Database.Constants.GetOrderChannelAmazonUk(); ; // may in future enable other order channels
|
||||||
|
|
||||||
// get current sku base pricing details (stock quantity, competative price, VAT info, etc.)
|
// get current sku base pricing details (stock quantity, competative price, VAT info, etc.)
|
||||||
skuInfo = new Data.Database.Sku.Price.ReadParameter(sqlConnectionString).Execute();
|
skuInfo = new Data.Database.Sku.Price.ReadParameter(sqlConnectionString).Execute();
|
||||||
@@ -70,6 +70,8 @@ namespace bnhtrade.Core.Logic.Sku.Price
|
|||||||
// loop through skus returnd from stock query
|
// loop through skus returnd from stock query
|
||||||
for (int i = 0; i < skuInfo.Count(); i++)
|
for (int i = 0; i < skuInfo.Count(); i++)
|
||||||
{
|
{
|
||||||
|
var existing = skuInfo[i];
|
||||||
|
|
||||||
string skuNumber = skuInfo[i].SkuNumber;
|
string skuNumber = skuInfo[i].SkuNumber;
|
||||||
|
|
||||||
var cr = new Model.Sku.Price.PriceInfo();
|
var cr = new Model.Sku.Price.PriceInfo();
|
||||||
|
|||||||
Reference in New Issue
Block a user