Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.4.3
-
Fix Version/s: 3.5.2
-
Component/s: None
-
Labels:None
Description
TL;DR
Invoice creation must use the blesta/pricing library.
When a coupon line item is generated for a service, the coupon calculates its discount from the full service price. However, the full service price may not be the actual price billed.
For example, if proration is enabled, the service price being billed may be less than the full service price. The coupon will then discount from the full price rather than the prorated price, causing too large of a discount, which may even lead to an invoice for a negative amount.
e.g.
$10.00 service
$0.50 prorated cost of the service
10% discount
Line Item Cost $0.50
Discount Amount $1.00 ($10 * 0.1)
Total: -$0.50
This issue applies to the coupon line item price when it is generated for an invoice. The totals displayed before the invoice is created appear to be correct as-is because they come from a separate calculation. When this issue is updated to support proration, we should consider the possibility of adding two line items for the coupons. One for the prorated amount over the prorated date range, and one for the full amount after the cut off day (if after the cut off day). Note that we must also consider whether the coupon recurs, and if not, it can only be applied to the prorated amount, and not the full amount after proration.
Issue Links
Activity
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Description |
When a coupon line item is generated for a service, the coupon calculates its discount from the full service price. However, the full service price may not be the actual price billed.
For example, if proration is enabled, the service price being billed may be less than the full service price. The coupon will then discount from the full price rather than the prorated price, causing too large of a discount, which may even lead to an invoice for a negative amount. e.g. $10.00 service $0.50 prorated cost of the service 10% discount Line Item Cost $0.50 Discount Amount $1.00 ($10 * 0.1) Total: -$0.50 |
When a coupon line item is generated for a service, the coupon calculates its discount from the full service price. However, the full service price may not be the actual price billed.
For example, if proration is enabled, the service price being billed may be less than the full service price. The coupon will then discount from the full price rather than the prorated price, causing too large of a discount, which may even lead to an invoice for a negative amount. e.g. $10.00 service $0.50 prorated cost of the service 10% discount Line Item Cost $0.50 Discount Amount $1.00 ($10 * 0.1) Total: -$0.50 ----- This issue applies to the coupon line item price when it is generated for an invoice. The totals displayed before the invoice is created appear to be correct as-is because they come from a separate calculation. When this issue is updated to support proration, we should consider the possibility of adding two line items for the coupons. One for the prorated amount over the prorated date range, and one for the full amount after the cut off day (if after the cut off day). Note that we must also consider whether the coupon recurs, and if not, it can only be applied to the prorated amount, and not the full amount after proration. |
Fix Version/s | 3.5.0-b2 [ 10701 ] | |
Fix Version/s | 3.5.0-b1 [ 10401 ] |
Sprint | 3.5.0 Sprint 5 [ 13 ] |
Rank | Ranked higher |
Sprint | 3.5.0 Sprint 5 [ 13 ] | 3.5.0 Sprint 6 [ 14 ] |
Fix Version/s | 3.5.0-b3 [ 10703 ] | |
Fix Version/s | 3.5.0-b2 [ 10701 ] |
Fix Version/s | 3.5.0-b4 [ 10704 ] | |
Fix Version/s | 3.5.0-b3 [ 10703 ] |
Fix Version/s | 3.5.0-b5 [ 10705 ] | |
Fix Version/s | 3.5.0-b4 [ 10704 ] |
Fix Version/s | 3.5.0 [ 10702 ] | |
Fix Version/s | 3.5.0-b5 [ 10705 ] |
Fix Version/s | 3.5.1 [ 10706 ] | |
Fix Version/s | 3.5.0 [ 10702 ] |
Sprint | 3.5.0 Sprint 6 [ 14 ] |
Rank | Ranked lower |
Description |
When a coupon line item is generated for a service, the coupon calculates its discount from the full service price. However, the full service price may not be the actual price billed.
For example, if proration is enabled, the service price being billed may be less than the full service price. The coupon will then discount from the full price rather than the prorated price, causing too large of a discount, which may even lead to an invoice for a negative amount. e.g. $10.00 service $0.50 prorated cost of the service 10% discount Line Item Cost $0.50 Discount Amount $1.00 ($10 * 0.1) Total: -$0.50 ----- This issue applies to the coupon line item price when it is generated for an invoice. The totals displayed before the invoice is created appear to be correct as-is because they come from a separate calculation. When this issue is updated to support proration, we should consider the possibility of adding two line items for the coupons. One for the prorated amount over the prorated date range, and one for the full amount after the cut off day (if after the cut off day). Note that we must also consider whether the coupon recurs, and if not, it can only be applied to the prorated amount, and not the full amount after proration. |
*TL;DR*
Invoice creation must use the *blesta/pricing* library. ---- When a coupon line item is generated for a service, the coupon calculates its discount from the full service price. However, the full service price may not be the actual price billed. For example, if proration is enabled, the service price being billed may be less than the full service price. The coupon will then discount from the full price rather than the prorated price, causing too large of a discount, which may even lead to an invoice for a negative amount. e.g. $10.00 service $0.50 prorated cost of the service 10% discount Line Item Cost $0.50 Discount Amount $1.00 ($10 * 0.1) Total: -$0.50 ----- This issue applies to the coupon line item price when it is generated for an invoice. The totals displayed before the invoice is created appear to be correct as-is because they come from a separate calculation. When this issue is updated to support proration, we should consider the possibility of adding two line items for the coupons. One for the prorated amount over the prorated date range, and one for the full amount after the cut off day (if after the cut off day). Note that we must also consider whether the coupon recurs, and if not, it can only be applied to the prorated amount, and not the full amount after proration. |
Fix Version/s | 3.5.2 [ 10707 ] | |
Fix Version/s | 3.5.1 [ 10706 ] |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |