File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,10 @@ class Invoice(models.Model): # noqa: PLR0904
285285 blank = True ,
286286 help_text = "Due date / Quote validity, keep blank unless specific terms are needed" ,
287287 )
288+ tax_date = models .DateField (
289+ blank = True ,
290+ help_text = "Date of taxable supply, keep blank for issue date" ,
291+ )
288292
289293 kind = models .IntegerField (choices = InvoiceKind )
290294 category = models .IntegerField (
@@ -355,6 +359,8 @@ def save( # type: ignore[override]
355359 if self .extra is None :
356360 self .extra = {}
357361 extra_fields : list [str ] = []
362+ if not self .tax_date :
363+ self .tax_date = self .issue_date
358364 if not self .due_date :
359365 self .due_date = self .issue_date + datetime .timedelta (
360366 days = self .get_due_delta ()
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ <h2>Issued by</h2>
247247 < th > Contact</ th >
248248 </ tr >
249249 < tr >
250- < td > {{ invoice.issue_date |date }}</ td >
250+ < td > {{ invoice.tax_date |date }}</ td >
251251 < td > 21668027</ td >
252252 < td > Michal Čihař</ td >
253253 < td > C 52324/KSUL Krajský soud v Ústí nad Labem</ td >
You can’t perform that action at this time.
0 commit comments