change discount material response
This commit is contained in:
parent
4f3a990c60
commit
7763c5278d
|
|
@ -772,4 +772,10 @@ namespace OnlineSalesAutoCrop.CoreAPI.Models
|
|||
Sent = 1,
|
||||
Error = 2
|
||||
}
|
||||
|
||||
public enum DiscountTypeEnum : short
|
||||
{
|
||||
ItemType = 1,
|
||||
InvoiceValueType =2
|
||||
}
|
||||
}
|
||||
|
|
@ -166,12 +166,12 @@ public class GetAttendanceByEmpResponse
|
|||
|
||||
public class GetDiscountResponse
|
||||
{
|
||||
public string SalesOrgcCode { get; set; }
|
||||
public string? SalesOrgCode { get; set; }
|
||||
public string DiscountCode { get; set; }
|
||||
public string DiscountName { get; set; }
|
||||
public string DistributorChannelCode { get; set; }
|
||||
public string DistributorChannelName { get; set; }
|
||||
public string CalculationType { get; set; }
|
||||
public string? DistributorChannelCode { get; set; }
|
||||
public string? DistributorChannelName { get; set; }
|
||||
public DiscountTypeEnum DiscountType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -179,10 +179,10 @@ public class GetDiscountMaterialResponse
|
|||
{
|
||||
public string DiscountCode { get; set; }
|
||||
public string CustomerCode { get; set; }
|
||||
public string MaterialCode { get; set; }
|
||||
public string? MaterialCode { get; set; }
|
||||
public string UnitOfMeasurement { get; set; }
|
||||
public string CalculationType { get; set; }
|
||||
public decimal ScaleValue { get; set; }
|
||||
public decimal Threshold { get; set; }
|
||||
public decimal DiscountValue { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using Ease.NetCore.DataAccess.SQL;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.Extensions.Options;
|
||||
using OnlineSalesAutoCrop.CoreAPI.Models;
|
||||
using OnlineSalesAutoCrop.CoreAPI.Models.Global;
|
||||
using OnlineSalesAutoCrop.CoreAPI.Models.Requests.MobileApp;
|
||||
using OnlineSalesAutoCrop.CoreAPI.Models.Responses;
|
||||
|
|
@ -725,12 +726,12 @@ public class MobileMasterDataService : IMobileMasterDataService
|
|||
{
|
||||
response.Items.Add(new GetDiscountResponse
|
||||
{
|
||||
SalesOrgcCode = dr.GetString(0),
|
||||
SalesOrgCode = dr.IsDBNull(0) ? null : dr.GetString(0),
|
||||
DiscountCode = dr.GetString(1),
|
||||
DiscountName = dr.GetString(2),
|
||||
DistributorChannelCode = dr.GetString(3),
|
||||
DistributorChannelName = dr.GetString(4),
|
||||
CalculationType = dr.GetString(5)
|
||||
DistributorChannelCode = dr.IsDBNull(0) ? null : dr.GetString(3),
|
||||
DistributorChannelName = dr.IsDBNull(0) ? null : dr.GetString(4),
|
||||
DiscountType = (DiscountTypeEnum)dr.GetInt32(5)
|
||||
});
|
||||
}
|
||||
dr.Close();
|
||||
|
|
@ -781,15 +782,15 @@ public class MobileMasterDataService : IMobileMasterDataService
|
|||
{
|
||||
response.Items.Add(new GetDiscountMaterialResponse
|
||||
{
|
||||
DiscountCode = dr.GetString(0),
|
||||
CustomerCode = dr.GetString(1),
|
||||
MaterialCode = dr.GetString(2),
|
||||
UnitOfMeasurement = dr.GetString(3),
|
||||
CalculationType = dr.GetString(4),
|
||||
DiscountCode = dr.IsDBNull(0) ? null : dr.GetString(0),
|
||||
CustomerCode = dr.IsDBNull(1) ? null : dr.GetString(1),
|
||||
MaterialCode = dr.IsDBNull(2) ? null : dr.GetString(2),
|
||||
UnitOfMeasurement = dr.IsDBNull(3) ? null : dr.GetString(3),
|
||||
CalculationType = dr.IsDBNull(4) ? null : dr.GetString(4),
|
||||
DiscountValue = dr.GetDecimal(5),
|
||||
StartDate = dr.GetDateTime(6),
|
||||
EndDate = dr.GetDateTime(7),
|
||||
ScaleValue = dr.GetDecimal(8),
|
||||
Threshold = dr.GetDecimal(8),
|
||||
});
|
||||
}
|
||||
dr.Close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user