Here's the code:
1. Updated the following tables [Nop_ShippingByTotal], [dbo].[Nop_ShippingByWeightAndCountry], [dbo].[Nop_ShippingByWeight]. Datatype of [From], [To], [ShippingChargePercentage], [ShippingChargeAmount] columns was changed from decimal(18, 0) to decimal(18, 2)
ALTER TABLE [dbo].[Nop_ShippingByTotal]
ALTER COLUMN [From] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByTotal]
ALTER COLUMN [To] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByTotal]
ALTER COLUMN [ShippingChargePercentage] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByTotal]
ALTER COLUMN [ShippingChargeAmount] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByWeightAndCountry]
ALTER COLUMN [From] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByWeightAndCountry]
ALTER COLUMN [To] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByWeightAndCountry]
ALTER COLUMN [ShippingChargePercentage] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByWeightAndCountry]
ALTER COLUMN [ShippingChargeAmount] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByWeight]
ALTER COLUMN [From] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByWeight]
ALTER COLUMN [To] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByWeight]
ALTER COLUMN [ShippingChargePercentage] decimal(18, 2) NOT NULL
ALTER TABLE [dbo].[Nop_ShippingByWeight]
ALTER COLUMN [ShippingChargeAmount] decimal(18, 2) NOT NULL
10. Updated the following stored procedures Nop_ShippingByTotalInsert, Nop_ShippingByTotalUpdate, Nop_ShippingByWeightAndCountryInsert, Nop_ShippingByWeightAndCountryUpdate, Nop_ShippingByWeightInsert, Nop_ShippingByWeightUpdate.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByTotalInsert]
(
@ShippingByTotalID int = NULL output,
@ShippingMethodID int,
@From decimal(18, 0),
@To decimal(18, 0),
@UsePercentage bit,
@ShippingChargePercentage decimal(18, 0),
@ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
INSERT
INTO [Nop_ShippingByTotal]
(
ShippingMethodID,
[From],
[To],
UsePercentage,
ShippingChargePercentage,
ShippingChargeAmount
)
VALUES
(
@ShippingMethodID,
@From,
@To,
@UsePercentage,
@ShippingChargePercentage,
@ShippingChargeAmount
)
set @ShippingByTotalID=@@identity
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByTotalUpdate]
(
@ShippingByTotalID int,
@ShippingMethodID int,
@From decimal(18, 0),
@To decimal(18, 0),
@UsePercentage bit,
@ShippingChargePercentage decimal(18, 0),
@ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
UPDATE [Nop_ShippingByTotal]
SET
ShippingMethodID=@ShippingMethodID,
[From]=@From,
[To]=@To,
UsePercentage=@UsePercentage,
ShippingChargePercentage=@ShippingChargePercentage,
ShippingChargeAmount=@ShippingChargeAmount
WHERE
ShippingByTotalID = @ShippingByTotalID
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByWeightAndCountryInsert]
(
@ShippingByWeightAndCountryID int = NULL output,
@ShippingMethodID int,
@CountryID int,
@From decimal(18, 0),
@To decimal(18, 0),
@UsePercentage bit,
@ShippingChargePercentage decimal(18, 0),
@ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
INSERT
INTO [Nop_ShippingByWeightAndCountry]
(
ShippingMethodID,
CountryID,
[From],
[To],
UsePercentage,
ShippingChargePercentage,
ShippingChargeAmount
)
VALUES
(
@ShippingMethodID,
@CountryID,
@From,
@To,
@UsePercentage,
@ShippingChargePercentage,
@ShippingChargeAmount
)
set @ShippingByWeightAndCountryID=@@identity
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByWeightAndCountryUpdate]
(
@ShippingByWeightAndCountryID int,
@ShippingMethodID int,
@CountryID int,
@From decimal(18, 0),
@To decimal(18, 0),
@UsePercentage bit,
@ShippingChargePercentage decimal(18, 0),
@ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
UPDATE [Nop_ShippingByWeightAndCountry]
SET
ShippingMethodID=@ShippingMethodID,
CountryID=@CountryID,
[From]=@From,
[To]=@To,
UsePercentage=@UsePercentage,
ShippingChargePercentage=@ShippingChargePercentage,
ShippingChargeAmount=@ShippingChargeAmount
WHERE
ShippingByWeightAndCountryID = @ShippingByWeightAndCountryID
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByWeightInsert]
(
@ShippingByWeightID int = NULL output,
@ShippingMethodID int,
@From decimal(18, 0),
@To decimal(18, 0),
@UsePercentage bit,
@ShippingChargePercentage decimal(18, 0),
@ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
INSERT
INTO [Nop_ShippingByWeight]
(
ShippingMethodID,
[From],
[To],
UsePercentage,
ShippingChargePercentage,
ShippingChargeAmount
)
VALUES
(
@ShippingMethodID,
@From,
@To,
@UsePercentage,
@ShippingChargePercentage,
@ShippingChargeAmount
)
set @ShippingByWeightID=@@identity
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByWeightUpdate]
(
@ShippingByWeightID int,
@ShippingMethodID int,
@From decimal(18, 0),
@To decimal(18, 0),
@UsePercentage bit,
@ShippingChargePercentage decimal(18, 0),
@ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
UPDATE [Nop_ShippingByWeight]
SET
ShippingMethodID=@ShippingMethodID,
[From]=@From,
[To]=@To,
UsePercentage=@UsePercentage,
ShippingChargePercentage=@ShippingChargePercentage,
ShippingChargeAmount=@ShippingChargeAmount
WHERE
ShippingByWeightID = @ShippingByWeightID
END
GO