@@ -27,26 +27,26 @@ class Status(models.IntegerChoices):
2727 RECONCILIATED = 7 , _ ('reconciliated' )
2828
2929 thirdparty_type = models .ForeignKey (ContentType , models .DO_NOTHING ,
30- db_column = 'ThirdpartyType' , null = True , unique = False )
31- thirdparty_id = models .CharField (db_column = 'ThirdpartyId' , max_length = 255 , null = True ) # object is referenced by uuid
30+ db_column = 'ThirdpartyType' , blank = True , null = True , unique = False )
31+ thirdparty_id = models .CharField (db_column = 'ThirdpartyId' , max_length = 255 , blank = True , null = True ) # object is referenced by uuid
3232 thirdparty = GenericForeignKey ('thirdparty_type' , 'thirdparty_id' )
3333
34- code_tp = models .CharField (db_column = 'CodeTp' , max_length = 255 , null = True )
34+ code_tp = models .CharField (db_column = 'CodeTp' , max_length = 255 , blank = True , null = True )
3535 code = models .CharField (db_column = 'Code' , max_length = 255 , null = False )
36- code_ext = models .CharField (db_column = 'CodeExt' , max_length = 255 , null = True )
36+ code_ext = models .CharField (db_column = 'CodeExt' , max_length = 255 , blank = True , null = True )
3737
38- date_due = DateField (db_column = 'DateDue' , null = True )
38+ date_due = DateField (db_column = 'DateDue' , blank = True , null = True )
3939
40- date_payed = DateField (db_column = 'DatePayed' , null = True )
40+ date_payed = DateField (db_column = 'DatePayed' , blank = True , null = True )
4141
4242 amount_discount = models .DecimalField (
43- db_column = 'AmountDiscount' , max_digits = 18 , decimal_places = 2 , null = True , default = 0.0 )
43+ db_column = 'AmountDiscount' , max_digits = 18 , decimal_places = 2 , null = True , default = 0.0 )
4444 amount_net = models .DecimalField (
4545 db_column = 'AmountNet' , max_digits = 18 , decimal_places = 2 , default = 0.0 )
4646 amount_total = models .DecimalField (
4747 db_column = 'AmountTotal' , max_digits = 18 , decimal_places = 2 , default = 0.0 )
4848
49- tax_analysis = models .JSONField (db_column = 'TaxAnalysis' , null = True )
49+ tax_analysis = models .JSONField (db_column = 'TaxAnalysis' , blank = True , null = True )
5050
5151 status = models .SmallIntegerField (
5252 db_column = 'Status' , null = False , choices = Status .choices , default = Status .DRAFT )
@@ -59,7 +59,7 @@ class Status(models.IntegerChoices):
5959 note = models .TextField (db_column = 'Note' , blank = True , null = True )
6060 terms = models .TextField (db_column = 'Terms' , blank = True , null = True )
6161
62- payment_reference = models .CharField (db_column = 'PaymentReference' , max_length = 255 , null = True )
62+ payment_reference = models .CharField (db_column = 'PaymentReference' , max_length = 255 , blank = True , null = True )
6363
6464 objects = GenericInvoiceManager ()
6565
@@ -71,9 +71,9 @@ class GenericInvoiceLineItem(GenericInvoiceQuerysetMixin, HistoryBusinessModel):
7171 code = models .CharField (db_column = 'Code' , max_length = 255 , null = False )
7272
7373 description = models .TextField (db_column = 'Description' , blank = True , null = True )
74- details = models .JSONField (db_column = 'Details' , null = True )
74+ details = models .JSONField (db_column = 'Details' , blank = True , null = True )
7575
76- ledger_account = models .CharField (db_column = 'LedgerAccount' , max_length = 255 , null = True )
76+ ledger_account = models .CharField (db_column = 'LedgerAccount' , max_length = 255 , blank = True , null = True )
7777
7878 quantity = models .IntegerField (db_column = 'Quantity' , default = 0.0 )
7979 unit_price = models .DecimalField (db_column = 'UnitPrice' , max_digits = 18 , decimal_places = 2 , default = 0.0 )
@@ -82,10 +82,10 @@ class GenericInvoiceLineItem(GenericInvoiceQuerysetMixin, HistoryBusinessModel):
8282
8383 deduction = models .DecimalField (db_column = 'Deduction' , max_digits = 18 , decimal_places = 2 , default = 0.0 )
8484
85- tax_rate = models .UUIDField (db_column = "CalculationUUID" , null = True )
86- tax_analysis = models .JSONField (db_column = 'TaxAnalysis' , null = True )
85+ tax_rate = models .UUIDField (db_column = "CalculationUUID" , blank = True , null = True )
86+ tax_analysis = models .JSONField (db_column = 'TaxAnalysis' , blank = True , null = True )
8787
88- amount_total = models .DecimalField (db_column = 'AmountTotal' , max_digits = 18 , decimal_places = 2 , null = True )
88+ amount_total = models .DecimalField (db_column = 'AmountTotal' , max_digits = 18 , decimal_places = 2 , default = 0.0 )
8989 amount_net = models .DecimalField (db_column = 'AmountNet' , max_digits = 18 , decimal_places = 2 , default = 0.0 )
9090
9191 objects = GenericInvoiceManager ()
@@ -101,21 +101,21 @@ class PaymentStatus(models.IntegerChoices):
101101 REFUNDED = 2 , _ ('refunded' )
102102 CANCELLED = 3 , _ ('cancelled' )
103103
104- code_tp = models .CharField (db_column = 'CodeTp' , max_length = 255 , null = True )
105- code_ext = models .CharField (db_column = 'CodeExt' , max_length = 255 , null = True )
106- code_receipt = models .CharField (db_column = 'CodeReceipt' , max_length = 255 , null = True )
104+ code_tp = models .CharField (db_column = 'CodeTp' , max_length = 255 , blank = True , null = True )
105+ code_ext = models .CharField (db_column = 'CodeExt' , max_length = 255 , blank = True , null = True )
106+ code_receipt = models .CharField (db_column = 'CodeReceipt' , max_length = 255 , blank = True , null = True )
107107
108- label = models .CharField (db_column = 'Label' , max_length = 255 , null = True )
108+ label = models .CharField (db_column = 'Label' , max_length = 255 , blank = True , null = True )
109109
110110 status = models .SmallIntegerField (db_column = 'Status' , null = False , choices = PaymentStatus .choices )
111111
112- amount_payed = models .DecimalField (db_column = 'AmountPayed' , max_digits = 18 , decimal_places = 2 , null = True )
113- fees = models .DecimalField (db_column = 'Fees' , max_digits = 18 , decimal_places = 2 , null = True )
114- amount_received = models .DecimalField (db_column = 'AmountReceived' , max_digits = 18 , decimal_places = 2 , null = True )
112+ amount_payed = models .DecimalField (db_column = 'AmountPayed' , max_digits = 18 , decimal_places = 2 , blank = True , null = True )
113+ fees = models .DecimalField (db_column = 'Fees' , max_digits = 18 , decimal_places = 2 , blank = True , null = True )
114+ amount_received = models .DecimalField (db_column = 'AmountReceived' , max_digits = 18 , decimal_places = 2 , blank = True , null = True )
115115
116- date_payment = DateField (db_column = 'DatePayment' , null = True )
116+ date_payment = DateField (db_column = 'DatePayment' , blank = True , null = True )
117117
118- payment_origin = models .CharField (db_column = 'PaymentOrigin' , max_length = 255 , null = True )
118+ payment_origin = models .CharField (db_column = 'PaymentOrigin' , max_length = 255 , blank = True , null = True )
119119
120120 objects = GenericInvoiceManager ()
121121
@@ -131,7 +131,7 @@ class EventType(models.IntegerChoices):
131131 PAYMENT = 3 , _ ('payment' )
132132 PAYMENT_ERROR = 4 , _ ('payment_error' )
133133
134- message = models .CharField (db_column = 'Message' , max_length = 500 , null = True )
134+ message = models .CharField (db_column = 'Message' , max_length = 500 , blank = True , null = True )
135135 event_type = models .SmallIntegerField (
136136 db_column = 'Status' , null = False , choices = EventType .choices , default = EventType .MESSAGE )
137137
@@ -143,11 +143,11 @@ class Meta:
143143
144144class Invoice (GenericInvoice ):
145145 subject_type = models .ForeignKey (ContentType , models .DO_NOTHING ,
146- db_column = 'SubjectType' , null = True , related_name = 'subject_type' , unique = False )
147- subject_id = models .CharField (db_column = 'SubjectId' , max_length = 255 , null = True ) # object is referenced by uuid
146+ db_column = 'SubjectType' , blank = True , null = True , related_name = 'subject_type' , unique = False )
147+ subject_id = models .CharField (db_column = 'SubjectId' , max_length = 255 , blank = True , null = True ) # object is referenced by uuid
148148 subject = GenericForeignKey ('subject_type' , 'subject_id' )
149149
150- date_invoice = DateField (db_column = 'DateInvoice' , default = date .today , null = True )
150+ date_invoice = DateField (db_column = 'DateInvoice' , default = date .today , blank = True , null = True )
151151
152152 class Meta :
153153 managed = True
@@ -156,8 +156,8 @@ class Meta:
156156
157157class InvoiceLineItem (GenericInvoiceLineItem ):
158158 line_type = models .ForeignKey (
159- ContentType , models .DO_NOTHING , db_column = 'LineType' , null = True , related_name = 'line_type' , unique = False )
160- line_id = models .CharField (db_column = 'LineId' , max_length = 255 , null = True ) # object is referenced by uuid
159+ ContentType , models .DO_NOTHING , db_column = 'LineType' , blank = True , null = True , related_name = 'line_type' , unique = False )
160+ line_id = models .CharField (db_column = 'LineId' , max_length = 255 , blank = True , null = True ) # object is referenced by uuid
161161 line = GenericForeignKey ('line_type' , 'line_id' )
162162
163163 invoice = models .ForeignKey (Invoice , models .DO_NOTHING , db_column = 'InvoiceId' , related_name = "line_items" )
@@ -185,12 +185,12 @@ class Meta:
185185
186186class Bill (GenericInvoice ):
187187 subject_type = models .ForeignKey (ContentType , models .DO_NOTHING ,
188- db_column = 'SubjectType' , null = True , related_name = 'subject_type_bill' ,
188+ db_column = 'SubjectType' , null = True ,blank = True , related_name = 'subject_type_bill' ,
189189 unique = False )
190- subject_id = models .CharField (db_column = 'SubjectId' , max_length = 255 , null = True ) # object is referenced by uuid
190+ subject_id = models .CharField (db_column = 'SubjectId' , max_length = 255 , blank = True , null = True ) # object is referenced by uuid
191191 subject = GenericForeignKey ('subject_type' , 'subject_id' )
192192
193- date_bill = DateField (db_column = 'DateBill' , default = date .today , null = True )
193+ date_bill = DateField (db_column = 'DateBill' , default = date .today ,blank = True , null = True )
194194
195195 class Meta :
196196 managed = True
@@ -199,8 +199,8 @@ class Meta:
199199
200200class BillItem (GenericInvoiceLineItem ):
201201 line_type = models .ForeignKey (
202- ContentType , models .DO_NOTHING , db_column = 'LineType' , null = True , related_name = 'line_type_bill' , unique = False )
203- line_id = models .CharField (db_column = 'LineId' , max_length = 255 , null = True ) # object is referenced by uuid
202+ ContentType , models .DO_NOTHING , db_column = 'LineType' , blank = True , null = True , related_name = 'line_type_bill' , unique = False )
203+ line_id = models .CharField (db_column = 'LineId' , max_length = 255 , blank = True , null = True ) # object is referenced by uuid
204204 line = GenericForeignKey ('line_type' , 'line_id' )
205205
206206 bill = models .ForeignKey (Bill , models .DO_NOTHING , db_column = 'BillId' , related_name = "line_items_bill" )
@@ -306,24 +306,24 @@ class ReconciliationStatus(models.IntegerChoices):
306306 REFUNDED = 2 , _ ('refunded' )
307307 CANCELLED = 3 , _ ('cancelled' )
308308
309- code_tp = models .CharField (db_column = 'CodeTp' , max_length = 255 , null = True )
310- code_ext = models .CharField (db_column = 'CodeExt' , max_length = 255 , null = True )
311- code_receipt = models .CharField (db_column = 'CodeReceipt' , max_length = 255 , null = True )
309+ code_tp = models .CharField (db_column = 'CodeTp' , max_length = 255 , blank = True , null = True )
310+ code_ext = models .CharField (db_column = 'CodeExt' , max_length = 255 , blank = True , null = True )
311+ code_receipt = models .CharField (db_column = 'CodeReceipt' , max_length = 255 , blank = True , null = True )
312312
313- label = models .CharField (db_column = 'Label' , max_length = 255 , null = True )
313+ label = models .CharField (db_column = 'Label' , max_length = 255 , blank = True , null = True )
314314
315315 reconciliation_status = models .SmallIntegerField (db_column = 'ReconciliationStatus' , null = False ,
316316 choices = ReconciliationStatus .choices )
317317
318- fees = models .DecimalField (db_column = 'Fees' , max_digits = 18 , decimal_places = 2 , null = True )
319- amount_received = models .DecimalField (db_column = 'AmountReceived' , max_digits = 18 , decimal_places = 2 , null = True )
318+ fees = models .DecimalField (db_column = 'Fees' , max_digits = 18 , decimal_places = 2 , blank = True , null = True )
319+ amount_received = models .DecimalField (db_column = 'AmountReceived' , max_digits = 18 , decimal_places = 2 , blank = True , null = True )
320320
321- date_payment = DateField (db_column = 'DatePayment' , null = True )
321+ date_payment = DateField (db_column = 'DatePayment' , blank = True , null = True )
322322
323- payment_origin = models .CharField (db_column = 'PaymentOrigin' , max_length = 255 , null = True )
323+ payment_origin = models .CharField (db_column = 'PaymentOrigin' , max_length = 255 , blank = True , null = True )
324324
325325 payer_ref = models .CharField (db_column = 'PayerRef' , max_length = 255 )
326- payer_name = models .CharField (db_column = 'PayerName' , max_length = 255 , null = True )
326+ payer_name = models .CharField (db_column = 'PayerName' , max_length = 255 , blank = True , null = True )
327327
328328 objects = GenericInvoiceManager ()
329329
@@ -343,16 +343,16 @@ class DetailPaymentStatus(models.IntegerChoices):
343343 db_column = 'PaymentUUID' , related_name = "invoice_payments" )
344344
345345 subject_type = models .ForeignKey (ContentType , models .DO_NOTHING , db_column = 'SubjectType' ,
346- related_name = 'subject_type_payment' , null = True , unique = False )
347- subject_id = models .CharField (db_column = 'SubjectId' , max_length = 255 , null = True )
346+ related_name = 'subject_type_payment' , blank = True , null = True , unique = False )
347+ subject_id = models .CharField (db_column = 'SubjectId' , max_length = 255 , blank = True , null = True )
348348 subject = GenericForeignKey ('subject_type' , 'subject_id' )
349349
350350 status = models .SmallIntegerField (db_column = 'Status' , null = False , choices = DetailPaymentStatus .choices )
351- fees = models .DecimalField (db_column = 'Fees' , max_digits = 18 , decimal_places = 2 , null = True )
352- amount = models .DecimalField (db_column = 'Amount' , max_digits = 18 , decimal_places = 2 , null = True )
351+ fees = models .DecimalField (db_column = 'Fees' , max_digits = 18 , decimal_places = 2 , blank = True , null = True )
352+ amount = models .DecimalField (db_column = 'Amount' , max_digits = 18 , decimal_places = 2 , blank = True , null = True )
353353
354- reconcilation_id = models .CharField (db_column = 'ReconcilationId' , max_length = 255 , null = True )
355- reconcilation_date = models .DateField (db_column = 'ReconcilationDate' , null = True )
354+ reconcilation_id = models .CharField (db_column = 'ReconcilationId' , max_length = 255 , blank = True , null = True )
355+ reconcilation_date = models .DateField (db_column = 'ReconcilationDate' , blank = True , null = True )
356356
357357 objects = GenericInvoiceManager ()
358358
0 commit comments