Skip to content

Commit 2fcbfa7

Browse files
author
Markus Falk
committed
VAT Rounding: Renamed Vat to Tax, several fixes
(#1323) Purchase reward points (#1809) taxable reward points with several new settings - rewardpointssettings.earnedrewardpointsaretaxable Fixes on associated product tax. Taxation splits now on associated products also for excl. tax. Remade taxSummary
1 parent 6f849cc commit 2fcbfa7

File tree

94 files changed

+81261
-78574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+81261
-78574
lines changed

src/Libraries/Nop.Core/Domain/Catalog/Product.cs

Lines changed: 722 additions & 709 deletions
Large diffs are not rendered by default.

src/Libraries/Nop.Core/Domain/Catalog/ProductEditorSettings.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,14 @@ public class ProductEditorSettings : ISettings
135135
/// </summary>
136136
public bool IsGiftCard { get; set; }
137137

138+
/// <summary>
139+
/// Gets or sets a value indicating whether 'reward points' section is shown
140+
/// </summary>
141+
public bool IsRewardPoints { get; set; }
138142
/// <summary>
139143
/// Gets or sets a value indicating whether 'Downloadable product' field is shown
140144
/// </summary>
145+
141146
public bool DownloadableProduct { get; set; }
142147

143148
/// <summary>
Lines changed: 73 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,73 @@
1-
using System;
2-
using Nop.Core.Domain.Orders;
3-
4-
namespace Nop.Core.Domain.Customers
5-
{
6-
/// <summary>
7-
/// Represents a reward point history entry
8-
/// </summary>
9-
public partial class RewardPointsHistory : BaseEntity
10-
{
11-
/// <summary>
12-
/// Gets or sets the customer identifier
13-
/// </summary>
14-
public int CustomerId { get; set; }
15-
16-
/// <summary>
17-
/// Gets or sets the store identifier in which these reward points were awarded or redeemed
18-
/// </summary>
19-
public int StoreId { get; set; }
20-
21-
/// <summary>
22-
/// Gets or sets the points redeemed/added
23-
/// </summary>
24-
public int Points { get; set; }
25-
26-
/// <summary>
27-
/// Gets or sets the points balance
28-
/// </summary>
29-
public int? PointsBalance { get; set; }
30-
31-
/// <summary>
32-
/// Gets or sets the used amount
33-
/// </summary>
34-
public decimal UsedAmount { get; set; }
35-
36-
/// <summary>
37-
/// Gets or sets the message
38-
/// </summary>
39-
public string Message { get; set; }
40-
41-
/// <summary>
42-
/// Gets or sets the date and time of instance creation
43-
/// </summary>
44-
public DateTime CreatedOnUtc { get; set; }
45-
46-
/// <summary>
47-
/// Gets or sets the order for which points were redeemed as a payment (spent by a customer when placing this order)
48-
/// </summary>
49-
public virtual Order UsedWithOrder { get; set; }
50-
51-
/// <summary>
52-
/// Gets or sets the customer
53-
/// </summary>
54-
public virtual Customer Customer { get; set; }
55-
}
56-
}
1+
using System;
2+
using Nop.Core.Domain.Orders;
3+
4+
namespace Nop.Core.Domain.Customers
5+
{
6+
/// <summary>
7+
/// Represents a reward point history entry
8+
/// </summary>
9+
public partial class RewardPointsHistory : BaseEntity
10+
{
11+
/// <summary>
12+
/// Gets or sets the customer identifier
13+
/// </summary>
14+
public int CustomerId { get; set; }
15+
16+
/// <summary>
17+
/// Gets or sets the store identifier in which these reward points were awarded or redeemed
18+
/// </summary>
19+
public int StoreId { get; set; }
20+
21+
/// <summary>
22+
/// Gets or sets the points redeemed/added
23+
/// </summary>
24+
public int Points { get; set; }
25+
/// <summary>
26+
/// Gets or sets the purchased points redeemed/added
27+
/// </summary>
28+
public int PointsPurchased { get; set; }
29+
/// <summary>
30+
/// Gets or sets the points balance
31+
/// </summary>
32+
public int? PointsBalance { get; set; }
33+
/// <summary>
34+
/// Gets or sets the purchased points balance
35+
/// </summary>
36+
public int? PointsBalancePurchased { get; set; }
37+
/// <summary>
38+
/// Gets or sets the used amount. Opposite sign as respective points!
39+
/// </summary>
40+
public decimal UsedAmount { get; set; }
41+
/// <summary>
42+
/// Gets or sets the used purchased amount. Opposite sign as respective points!
43+
/// </summary>
44+
public decimal UsedAmountPurchased { get; set; }
45+
/// <summary>
46+
/// Gets or sets the message
47+
/// </summary>
48+
public string Message { get; set; }
49+
50+
/// <summary>
51+
/// Gets or sets the date and time of instance creation
52+
/// </summary>
53+
public DateTime CreatedOnUtc { get; set; }
54+
55+
/// <summary>
56+
/// Gets or sets the order for which points were redeemed as a payment (spent by a customer when placing this order)
57+
/// </summary>
58+
public virtual Order UsedWithOrder { get; set; }
59+
60+
/// <summary>
61+
/// Gets or sets the customer
62+
/// </summary>
63+
public virtual Customer Customer { get; set; }
64+
/// <summary>
65+
/// Gets or sets the associated order item identifier
66+
/// </summary>
67+
public int? PurchasedWithOrderItemId { get; set; }
68+
/// <summary>
69+
/// Gets or sets the associated order item
70+
/// </summary>
71+
public virtual OrderItem PurchasedWithOrderItem { get; set; }
72+
}
73+
}
Lines changed: 87 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,88 @@
1-
using Nop.Core.Configuration;
2-
3-
namespace Nop.Core.Domain.Customers
4-
{
5-
public class RewardPointsSettings : ISettings
6-
{
7-
/// <summary>
8-
/// Gets or sets a value indicating whether Reward Points Program is enabled
9-
/// </summary>
10-
public bool Enabled { get; set; }
11-
12-
/// <summary>
13-
/// Gets or sets a value of Reward Points exchange rate
14-
/// </summary>
15-
public decimal ExchangeRate { get; set; }
16-
17-
/// <summary>
18-
/// Gets or sets the minimum reward points to use
19-
/// </summary>
20-
public int MinimumRewardPointsToUse { get; set; }
21-
22-
/// <summary>
23-
/// Gets or sets a number of points awarded for registration
24-
/// </summary>
25-
public int PointsForRegistration { get; set; }
26-
27-
/// <summary>
28-
/// Gets or sets a number of points awarded for purchases (amount in primary store currency)
29-
/// </summary>
30-
public decimal PointsForPurchases_Amount { get; set; }
31-
32-
/// <summary>
33-
/// Gets or sets a number of points awarded for purchases
34-
/// </summary>
35-
public int PointsForPurchases_Points { get; set; }
36-
37-
/// <summary>
38-
/// Gets or sets a delay before activation points
39-
/// </summary>
40-
public int ActivationDelay { get; set; }
41-
42-
/// <summary>
43-
/// Gets or sets the period of activation delay
44-
/// </summary>
45-
public int ActivationDelayPeriodId { get; set; }
46-
47-
/// <summary>
48-
/// Gets or sets a value indicating whether "You will earn" message should be displayed
49-
/// </summary>
50-
public bool DisplayHowMuchWillBeEarned { get; set; }
51-
52-
/// <summary>
53-
/// Gets or sets a value indicating whether all reward points are accumulated in one balance for all stores and they can be used in any store. Otherwise, each store has its own rewards points and they can only be used in that store.
54-
/// </summary>
55-
public bool PointsAccumulatedForAllStores { get; set; }
56-
57-
/// <summary>
58-
/// Gets or sets the page size is for history of reward points on my account page
59-
/// </summary>
60-
public int PageSize { get; set; }
61-
}
1+
using Nop.Core.Configuration;
2+
3+
namespace Nop.Core.Domain.Customers
4+
{
5+
public class RewardPointsSettings : ISettings
6+
{
7+
/// <summary>
8+
/// Gets or sets a value indicating whether Reward Points Program is enabled
9+
/// </summary>
10+
public bool Enabled { get; set; }
11+
12+
/// <summary>
13+
/// Gets or sets a value of Reward Points exchange rate
14+
/// </summary>
15+
public decimal ExchangeRate { get; set; }
16+
17+
/// <summary>
18+
/// Gets or sets the minimum reward points to use
19+
/// </summary>
20+
public int MinimumRewardPointsToUse { get; set; }
21+
22+
/// <summary>
23+
/// Gets or sets a number of points awarded for registration
24+
/// </summary>
25+
public int PointsForRegistration { get; set; }
26+
27+
/// <summary>
28+
/// Gets or sets a number of points awarded for purchases (amount in primary store currency)
29+
/// </summary>
30+
public decimal PointsForPurchases_Amount { get; set; }
31+
32+
/// <summary>
33+
/// Gets or sets a number of points awarded for purchases
34+
/// </summary>
35+
public int PointsForPurchases_Points { get; set; }
36+
37+
/// <summary>
38+
/// Gets or sets a delay before activation points
39+
/// </summary>
40+
public int ActivationDelay { get; set; }
41+
42+
/// <summary>
43+
/// Gets or sets the period of activation delay
44+
/// </summary>
45+
public int ActivationDelayPeriodId { get; set; }
46+
47+
/// <summary>
48+
/// Gets or sets a value indicating whether "You will earn" message should be displayed
49+
/// </summary>
50+
public bool DisplayHowMuchWillBeEarned { get; set; }
51+
52+
/// <summary>
53+
/// Gets or sets a value indicating whether all reward points are accumulated in one balance for all stores and they can be used in any store. Otherwise, each store has its own rewards points and they can only be used in that store.
54+
/// </summary>
55+
public bool PointsAccumulatedForAllStores { get; set; }
56+
57+
/// <summary>
58+
/// Gets or sets the page size is for history of reward points on my account page
59+
/// </summary>
60+
public int PageSize { get; set; }
61+
62+
/// <summary>
63+
/// Gets or sets a value indicating whether earned reward points are taxable
64+
/// </summary>
65+
public bool EarnedRewardPointsAreTaxable { get; set; }
66+
/// <summary>
67+
/// Gets or sets a value indicating whether reward points can be earned on shipping
68+
/// </summary>
69+
public bool AwardPointsIncludeShipping { get; set; }
70+
/// <summary>
71+
/// Gets or sets a value indicating whether reward points can be earned on payment fee
72+
/// </summary>
73+
public bool AwardPointsIncludePaymentMethodAdditionalFee { get; set; }
74+
/// <summary>
75+
/// Gets or sets a value indicating whether giftcards applied to payment amount should be excluded for reward points calculation
76+
/// </summary>
77+
public bool AwardPointsExcludeGiftCard { get; set; }
78+
/// <summary>
79+
/// Gets or sets a value indicating whether purchased reward points applied to payment amount should be excluded for reward points calculation
80+
/// </summary>
81+
public bool AwardPointsExcludePurchasedRewardPoints { get; set; }
82+
/// <summary>
83+
/// Gets or sets a value indicating whether reward points can only be earned when using purchased reward points for payment
84+
/// </summary>
85+
public bool EarnRewardPointsOnlyWhenUsingPurchasedRewardPoints { get; set; }
86+
87+
}
6288
}

0 commit comments

Comments
 (0)