Payment
hypha.apply.projects.models.payment
¶
CHANGES_REQUESTED_BY_STAFF
module-attribute
¶
CHANGES_REQUESTED_BY_FINANCE
module-attribute
¶
INVOICE_STATUS_CHOICES
module-attribute
¶
INVOICE_STATUS_CHOICES = [(SUBMITTED, gettext_lazy('Submitted')), (RESUBMITTED, gettext_lazy('Resubmitted')), (CHANGES_REQUESTED_BY_STAFF, gettext_lazy('Changes requested by staff')), (CHANGES_REQUESTED_BY_FINANCE, gettext_lazy('Changes requested by finance')), (APPROVED_BY_STAFF, gettext_lazy('Approved by staff')), (APPROVED_BY_FINANCE, gettext_lazy('Approved by finance')), (PAID, gettext_lazy('Paid')), (PAYMENT_FAILED, gettext_lazy('Payment failed')), (DECLINED, gettext_lazy('Declined'))]
INVOICE_TRANISTION_TO_RESUBMITTED
module-attribute
¶
INVOICE_TRANISTION_TO_RESUBMITTED = [SUBMITTED, RESUBMITTED, CHANGES_REQUESTED_BY_STAFF, CHANGES_REQUESTED_BY_FINANCE]
INVOICE_STATUS_PM_CHOICES
module-attribute
¶
INVOICE_STATUS_PM_CHOICES = [CHANGES_REQUESTED_BY_STAFF, APPROVED_BY_STAFF, DECLINED]
INVOICE_STATUS_FINANCE_1_CHOICES
module-attribute
¶
INVOICE_STATUS_FINANCE_1_CHOICES = [CHANGES_REQUESTED_BY_FINANCE, APPROVED_BY_FINANCE, DECLINED, PAID, PAYMENT_FAILED]
InvoiceQueryset
¶
InvoiceDeliverable
¶
Invoice
¶
Bases: Model
project
class-attribute
instance-attribute
¶
by
class-attribute
instance-attribute
¶
paid_value
class-attribute
instance-attribute
¶
paid_value = DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(Decimal('0.01'))], null=True)
document
class-attribute
instance-attribute
¶
document = FileField(upload_to=invoice_path, storage=PrivateStorage())
message_for_pm
class-attribute
instance-attribute
¶
invoice_number
class-attribute
instance-attribute
¶
invoice_amount
class-attribute
instance-attribute
¶
invoice_amount = DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(Decimal('0.01'))], null=True, verbose_name=gettext_lazy('Invoice amount'))
invoice_date
class-attribute
instance-attribute
¶
paid_date
class-attribute
instance-attribute
¶
status
class-attribute
instance-attribute
¶
status = FSMField(default=SUBMITTED, choices=INVOICE_STATUS_CHOICES)
deliverables
class-attribute
instance-attribute
¶
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
vendor_document_number
property
¶
Vendor document number is a required field to create invoices in IntAcct.
Formatting should be HP###### i.e. HP000001 and so on.
transition_invoice_to_resubmitted
¶
Tranistion invoice to resubmitted status. This method generally gets used on invoice edit.
Source code in hypha/apply/projects/models/payment.py
can_user_delete
¶
can_user_edit
¶
Check when an user can edit an invoice. Only applicant and staff have permission to edit invoice based on its current status.
Source code in hypha/apply/projects/models/payment.py
can_user_change_status
¶
Check user roles that can tranistion invoice status based on the current status.
Source code in hypha/apply/projects/models/payment.py
can_user_edit_deliverables
¶
Source code in hypha/apply/projects/models/payment.py
SupportingDocument
¶
Bases: Model
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
document
class-attribute
instance-attribute
¶
document = FileField(upload_to='supporting_documents', storage=PrivateStorage())