So I have a section that populates a calculated result to three labels
See here in the design.
And this is what those labels show:-
The way I have formatted the result is the same in all three labels, see here:-
# Print the calculations in boxes on the quotation page
self.label_subtotal.text = "£ {:.2f}".format(self.subtotal)
self.label_totalipt.text = "£ {:.2f}".format(self.totalipt)
self.label_totalpremium.text = "£ {:.2f}".format(self.totalpremium)
This is what the console prints for those exact same boxes :-
**Final Calculations for Premium**
**Sub Total**
Sub Total is £ 128.90
**Total IPT (Insurance Premium Tax)**
Total Insurance Premium Tax is £ 25.78
**Total Premium Including IPT)**
Total Premium is £ 154.68
This is the code for the console print statements
print("**Final Calculations for Premium**")
print("**Sub Total**")
self.subtotal = self.totalage + self.totaldays + self.totalbaggage + self.totalarticle + self.totalcancellation + self.totallocation
print("Sub Total is £ {:.2f}".format(self.subtotal))
print("**Total IPT (Insurance Premium Tax)**")
self.totalipt = self.subtotal * self.policyipt
print("Total Insurance Premium Tax is £ {:.2f}".format(self.totalipt))
print("**Total Premium Including IPT)**")
self.totalpremium = self.subtotal + self.totalipt
print("Total Premium is £ {:.2f}".format(self.totalpremium))
Why am I getting 5 results? I double checked the code and cut and paste the last part of the print statement, I have no other things labelled as subtotal before this. The label naming structure is the same on the others (I called it the same as the variable)
I deleted the label and re-did it, that didnt change anything
Any ideas?