Skip to content

Commit

Permalink
fix: remove obsolete methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ksavosteev committed Sep 11, 2023
1 parent 08e22cc commit 3f80f18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,12 @@ protected virtual async Task EnsureThatAllOperationsHaveNumber(CustomerOrder ord
var numberTemplate = opType + "{0:yyMMdd}-{1:D5}";
if (store != null)
{
numberTemplate = store.Settings.GetSettingValue("Order." + objectTypeName + "NewNumberTemplate", numberTemplate);
var descriptor = new SettingDescriptor
{
Name = "Order." + objectTypeName + "NewNumberTemplate",
DefaultValue = numberTemplate,
};
numberTemplate = store.Settings.GetValue<string>(descriptor);
}

operation.Number = _uniqueNumberGenerator.GenerateNumber(numberTemplate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,7 @@ public async Task<ActionResult<Shipment>> GetNewShipment(string id)
retVal.Status = "New";

var store = await _storeService.GetNoCloneAsync(order.StoreId, StoreResponseGroup.StoreInfo.ToString());
var numberTemplate = store.Settings.GetSettingValue(
ModuleConstants.Settings.General.OrderShipmentNewNumberTemplate.Name,
ModuleConstants.Settings.General.OrderShipmentNewNumberTemplate.DefaultValue);
var numberTemplate = store.Settings.GetValue<string>(ModuleConstants.Settings.General.OrderShipmentNewNumberTemplate);
retVal.Number = _uniqueNumberGenerator.GenerateNumber(numberTemplate.ToString());

return Ok(retVal);
Expand Down Expand Up @@ -453,9 +451,7 @@ public async Task<ActionResult<PaymentIn>> GetNewPayment(string id)
retVal.Status = retVal.PaymentStatus.ToString();

var store = await _storeService.GetNoCloneAsync(order.StoreId, StoreResponseGroup.StoreInfo.ToString());
var numberTemplate = store.Settings.GetSettingValue(
ModuleConstants.Settings.General.OrderPaymentInNewNumberTemplate.Name,
ModuleConstants.Settings.General.OrderPaymentInNewNumberTemplate.DefaultValue);
var numberTemplate = store.Settings.GetValue<string>(ModuleConstants.Settings.General.OrderPaymentInNewNumberTemplate);
retVal.Number = _uniqueNumberGenerator.GenerateNumber(numberTemplate.ToString());
return Ok(retVal);
}
Expand Down

0 comments on commit 3f80f18

Please sign in to comment.