diff --git a/src/backoffice/templates/includes/posreport_list_table.html b/src/backoffice/templates/includes/posreport_list_table.html index a3b7e008..3f722658 100644 --- a/src/backoffice/templates/includes/posreport_list_table.html +++ b/src/backoffice/templates/includes/posreport_list_table.html @@ -1,3 +1,4 @@ +{% load bornhack %} @@ -5,6 +6,7 @@ + @@ -15,6 +17,7 @@ + + + + + + @@ -67,47 +74,63 @@ PosReport {{ posreport.date }} {{ posreport.pos.name }} | Pos | BackOffice | {{ + + + + + + + + + + + +
Pos Bank Responsible Pos ResponsibleOK? Actions
{{ pr.pos.name }} {{ pr.bank_responsible }} {{ pr.pos_responsible }}{{ pr.allok | truefalseicon }}
Details diff --git a/src/backoffice/templates/posreport_detail.html b/src/backoffice/templates/posreport_detail.html index 1a5829ed..aba9a5d1 100644 --- a/src/backoffice/templates/posreport_detail.html +++ b/src/backoffice/templates/posreport_detail.html @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% load bornhack %} {% block title %} PosReport {{ posreport.date }} {{ posreport.pos.name }} | Pos | BackOffice | {{ block.super }} @@ -49,6 +50,10 @@ PosReport {{ posreport.date }} {{ posreport.pos.name }} | Pos | BackOffice | {{
Pos Responsible {{ posreport.pos_responsible }}

All OK?{{ posreport.allok | truefalseicon }}

+
Counts @@ -58,8 +63,10 @@ PosReport {{ posreport.date }} {{ posreport.pos.name }} | Pos | BackOffice | {{ What Bank Start Pos StartStart OK? Pos End Bank EndEnd OK?
DKK {{ posreport.bank_count_dkk_start }} {{ posreport.pos_count_dkk_start }}{{ posreport.dkk_start_ok | truefalseicon }} {{ posreport.pos_count_dkk_end }} {{ posreport.bank_count_dkk_end }}{{ posreport.dkk_end_ok | truefalseicon }}
5 HAX {{ posreport.bank_count_hax5_start }} {{ posreport.pos_count_hax5_start }}{{ posreport.hax5_start_ok | truefalseicon }} {{ posreport.pos_count_hax5_end }} {{ posreport.bank_count_hax5_end }}{{ posreport.hax5_end_ok | truefalseicon }}
10 HAX {{ posreport.bank_count_hax10_start }} {{ posreport.pos_count_hax10_start }}{{ posreport.hax10_start_ok | truefalseicon }} {{ posreport.pos_count_hax10_end }} {{ posreport.bank_count_hax10_end }}{{ posreport.hax10_end_ok | truefalseicon }}
20 HAX {{ posreport.bank_count_hax20_start }} {{ posreport.pos_count_hax20_start }}{{ posreport.hax20_start_ok | truefalseicon }} {{ posreport.pos_count_hax20_end }} {{ posreport.bank_count_hax20_end }}{{ posreport.hax20_end_ok | truefalseicon }}
50 HAX {{ posreport.bank_count_hax50_start }} {{ posreport.pos_count_hax50_start }}{{ posreport.hax50_start_ok | truefalseicon }} {{ posreport.pos_count_hax50_end }} {{ posreport.bank_count_hax50_end }}{{ posreport.hax50_end_ok | truefalseicon }}
100 HAX {{ posreport.bank_count_hax100_start }} {{ posreport.pos_count_hax100_start }}{{ posreport.hax100_start_ok | truefalseicon }} {{ posreport.pos_count_hax100_end }} {{ posreport.bank_count_hax100_end }}{{ posreport.hax100_end_ok | truefalseicon }}
+ + POS JSON + {{ posreport.pos_json }}

+ diff --git a/src/economy/models.py b/src/economy/models.py index 3ebfc009..0aa6ec48 100644 --- a/src/economy/models.py +++ b/src/economy/models.py @@ -691,3 +691,70 @@ class PosReport(CampRelatedModel, UUIDModel): "posreport_uuid": self.uuid, }, ) + + @property + def dkk_start_ok(self): + return self.bank_count_dkk_start == self.pos_count_dkk_start + + @property + def hax5_start_ok(self): + return self.bank_count_hax5_start == self.pos_count_hax5_start + + @property + def hax10_start_ok(self): + return self.bank_count_hax10_start == self.pos_count_hax10_start + + @property + def hax20_start_ok(self): + return self.bank_count_hax20_start == self.pos_count_hax20_start + + @property + def hax50_start_ok(self): + return self.bank_count_hax50_start == self.pos_count_hax50_start + + @property + def hax100_start_ok(self): + return self.bank_count_hax100_start == self.pos_count_hax100_start + + @property + def dkk_end_ok(self): + return self.bank_count_dkk_end == self.pos_count_dkk_end + + @property + def hax5_end_ok(self): + return self.bank_count_hax5_end == self.pos_count_hax5_end + + @property + def hax10_end_ok(self): + return self.bank_count_hax10_end == self.pos_count_hax10_end + + @property + def hax20_end_ok(self): + return self.bank_count_hax20_end == self.pos_count_hax20_end + + @property + def hax50_end_ok(self): + return self.bank_count_hax50_end == self.pos_count_hax50_end + + @property + def hax100_end_ok(self): + return self.bank_count_hax100_end == self.pos_count_hax100_end + + @property + def allok(self): + return all( + [ + self.dkk_start_ok, + self.hax5_start_ok, + self.hax10_start_ok, + self.hax20_start_ok, + self.hax50_start_ok, + self.hax100_start_ok, + self.dkk_end_ok, + self.hax5_end_ok, + self.hax10_end_ok, + self.hax20_end_ok, + self.hax50_end_ok, + self.hax100_end_ok, + ] + )