Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The link with the Source and actor won’t be in a form a database foreign keys because those could be from different table.

invoices

( Nice to have: editable if not payed or validated)

field

type

comment

HistoryBusinessModel fields

subject_type

str

Code Block
languagejson
  contribution/contract/funding --> Drop down

subject_id

uuid/int ?

https://stackoverflow.com/questions/33528098/django-model-one-foreign-key-to-many-tables Picker based on drop down ? (multiple picker displayed based drop down ? )

thirdparty_type

str

Code Block
languagejson
Insuree/PH/payer/User --> Drop down

thirdparty_id

uuid/int ?

https://stackoverflow.com/questions/33528098/django-model-one-foreign-key-to-many-tables Picker based on drop down ? (multiple picker displayed based drop down ? )

related_invoice_id

uuid

link to invoices

 code

 str 

or reference for the insurance (editable)

 code_tp

 str 

or reference for the recipient (editable)

 code_ext

 str 

if required for external system integration such as payment systems (editable)

 date_due

 date 

date on which the payment is due (editable)

 date_invoice

 date 

Date of the “invoice“ (date of today but editable)

 *dateValidFrom

 date 

invoice covering service/item from (editable)

 *dateValidTo

 date 

invoice covering service/item to (editable)

 date_payed

 date 

Date on which the payment was actually documented as Done (editable)

 amount_discount

 float 

total of the detail discount (calculated be)

 amount_net

 float 

Total without tax (calculated be)

 tax_analysis

 json 

Code Block
languagejson
(calculated be)
tax details {
  "lines": [
    {"code":"", "label":"", "rate":"", "base":"", "amount":""}]
    …
  ],
  "total":""
}

 amount_total

 float 

total net + tax total (calculated be)

 status

 int 

ENUM: draft, validated, payed, cancelled, deleted (editable ), amended, suspended

 currency_tp_code

 str 

currency of the recipient (if different) (hidden)

 currency_code

 str 

currency of insurance (calculated be) (hidden)

 note

 bigttext 

(editable)

 terms

 bigttext 

conditions (editable)

payment_reference

 str 

...

field

type

comment

HistoryBusinessModel fields

code

 str 

reference (editable)

line_type (displayed as a link/fe-contribution: List of Modules claims, Contract details, Policies)

policy, contribution --> Drop down

line_id

invoiceId

UUID

reference to invoice (hidden)

description

 str 

(editable)

details (UI displayed or hoover above description tooltip)

 json 

depend of the type, TBD (editable as text) if not json wrap it in {'text':DATA} ← quote must be escaped

ledger_account

 str

from specific payment module (editable)

quantity

 float 

(editable)

unit_price

 type 

(editable)

discount

 float 

percentage of discount

deduction

float

to document difference between the std price and the price to be paid, useful for relative pricing (editable)

 tax tax_rate

 Calculation uuid 

Calculation to calculate the tax (picker, rule type: tax, subtype *)

tax_analysis(hoover above amount_total tooltip)

json

Code Block
languagejson
calculated be with rules, show only after saving, not displayed during line update,  hid old value
tax details {
  "lines": [
    {"code":"", "label":"", "rate":"", "base":"", "amount":""}]
    …
  ],
  "total":""
}

amount_total

float

net +tax (calculated be, updated fe after saving line) :calculated from service, based on invoiceitem

amount_net

qty * unitprice unit_price*quantity*(1-discount)-deduction (calculated be/, updated fe after saving line)

...

field

type

comment

HistoryModel fields

 

Status

int

Accepted / Rejected/refunded/cancelled (editable)

code_ext

str

payment reference (editable)

label

str

label of the payment (editable)

code_rcp

str

Reference from the payment system / bank (editable)

invoiceId

UUID

reference to invoice (hidden)

code_receipt

 str 

receipt number (editable)

amount_payed

 float

Amount that need to be matched against business items (fees might be added if there were removed before reaching the system) (editable)

fees

 float

(editable)

amount_received

float

Amount that is received (may include or not the fees) (editable)

date_payment

date

(editable)

invoiceEvents

...

Contribution plan calculation rule: Product modelinglegacy contribution


[out of scope]Claim Co-paiment:

...

card page

general information

All schema Bold model fields but UUID

if not payed:

  • Delete button

if payed show no button

Should have Print as it is for the claim

tabs

invoiceLines

read only, All invoice MUST be generated using specific payment module

search filters on All bold schema fields but UUID

colunm to show All bold schema fields but UUID

invoicePayment

search filters on All bold schema fields but UUID

  • Add Payment button near the search (see add contract insuree)

colunm column to show All bold schema fields but UUID

  • on each line:

    • delete payment

    • edit payment (modal popup), all fields but UUID can be modified

...

must: message readonly once created: nice-to-have: user can change only his own message

colunm to show All bold schema fields but UUID

Account receivable, using the same structure as account receivable, when associated to the contract might also replace the “contribution/premium“

...