mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
fixed bug in gbis variance 2?
This commit is contained in:
parent
a7e593ecd9
commit
f9957a55d0
1 changed files with 4 additions and 3 deletions
|
|
@ -4172,7 +4172,8 @@ def forecast_remaining_sales(loader):
|
||||||
gbis_remaining = int(np.round(gbis_remaining_pre_cancellations * ha_gbis_sale_conversion))
|
gbis_remaining = int(np.round(gbis_remaining_pre_cancellations * ha_gbis_sale_conversion))
|
||||||
gbis_remaining_revenue = int(gbis_remaining * gbis_rate)
|
gbis_remaining_revenue = int(gbis_remaining * gbis_rate)
|
||||||
# This is the number we expect to cancel
|
# This is the number we expect to cancel
|
||||||
gbis_remaining_expected_cancellations = int(gbis_remaining_pre_cancellations - gbis_remaining) * gbis_rate
|
gbis_remaining_expected_cancellations = int(gbis_remaining_pre_cancellations - gbis_remaining)
|
||||||
|
gbis_remaining_expected_cancellations_revenue = gbis_remaining_expected_cancellations * gbis_rate
|
||||||
|
|
||||||
# GBIS delta
|
# GBIS delta
|
||||||
if original_warmfront_remaining_gbis == 0:
|
if original_warmfront_remaining_gbis == 0:
|
||||||
|
|
@ -4313,7 +4314,7 @@ def forecast_remaining_sales(loader):
|
||||||
)
|
)
|
||||||
|
|
||||||
if gbis_variance_2 != 0:
|
if gbis_variance_2 != 0:
|
||||||
raise ValueError("Something went wrong in gbis_variance")
|
raise ValueError("Something went wrong in gbis_variance2")
|
||||||
|
|
||||||
to_append = {
|
to_append = {
|
||||||
("", "", "", "HA Name"): ha_name,
|
("", "", "", "HA Name"): ha_name,
|
||||||
|
|
@ -4414,7 +4415,7 @@ def forecast_remaining_sales(loader):
|
||||||
"GBIS Postcode list", "Of which expected sales - £", "Remaining - £",
|
"GBIS Postcode list", "Of which expected sales - £", "Remaining - £",
|
||||||
"GBIS total"): gbis_remaining_revenue,
|
"GBIS total"): gbis_remaining_revenue,
|
||||||
("GBIS Postcode list", "Of which expected cancellations -£", "Remaining - £", "GBIS total"):
|
("GBIS Postcode list", "Of which expected cancellations -£", "Remaining - £", "GBIS total"):
|
||||||
gbis_remaining_expected_cancellations
|
gbis_remaining_expected_cancellations_revenue
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make sure nothing is forgotten due to duplicate multi-index keys
|
# Make sure nothing is forgotten due to duplicate multi-index keys
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue