Project Payment Schedule¶
-
class
moco_wrapper.models.
ProjectPaymentSchedule
(moco)¶ Class for handling billing schedules for fixed price projects.
Fixed Price projects can have a target date they should be billed on (in the future). With this class you can create this target entry (and how much should be billed).
For Example you can create a project that will be billed in four (4) steps over the year.
from moco_wrapper import Moco from datetime import date m = Moco() leader_id = 1 customer_id = 2 #create fixed price projects project = m.Project.create( "my fixed price project", "EUR", leader_id, customer_id, fixed_price=True, budget=4000 ).data first_payment = ProjectPaymentSchedule.create(project.id, 1000.0, date(2020, 3, 1)) second_payment = ProjectPaymentSchedule.create(project.id, 1000.0, date(2020, 6, 1)) third_payment = ProjectPaymentSchedule.create(project.id, 1000.0, date(2020, 9, 1)) fourth_payment = ProjectPaymentSchedule.create(project.id, 1000.0, date(2020, 12, 1))
See also
-
create
(project_id: int, net_total: float, schedule_date: datetime.date, title: str = None, checked: bool = False)¶ Creates a new project payment schedule.
Parameters: - project_id (int) – The id of the project the entry belongs to
- net_total (float) – How much should be billed on this schedule
- schedule_date (datetime.date, str) – Date of the entry
- title (str) – Title string
- checked – Mark entry as checked (the entry will be crossed out in the UI)
Returns: The created schedule item
-
delete
(project_id: int, schedule_id: int)¶ Delete a project payment schedule item
Parameters: - project_id (int) – Project the payment schedule belongs to
- schedule_id (int) – Id of the schedule item to delete
Returns: The deleted response on success
-
get
(project_id: int, schedule_id: int)¶ Retrieves project payment schedule.
Parameters: - project_id (int) – Id of the project to schedule item belongs to
- schedule_id (int) – Id of the schedule to retrieve
Returns: The schedule item
-
getlist
(project_id: int, sort_by: str = None, sort_order: str = 'asc', page: int = 1)¶ Retrieve a list of project payment schedules
Parameters: - project_id (int) – Project id of the schedule items
- sort_by (str) – Field to sort the results by
- sort_order (str) – asc or desc
- page (int) – Page number (default 1)
Returns: List of schedules payments
-
update
(project_id: int, schedule_id: int, net_total: float = None, schedule_date: datetime.date = None, title: str = None, checked: bool = None)¶ Updates an existing project payment schedule.
Parameters: - project_id (int) – Project id the schedule item belongs to
- schedule_id (int) – Id of the schedule item to update
- net_total (float) – Total amount to be billed
- schedule_date (datetime.date, str) – Date the billing will take place
- title (str) – Title of the item
- checked (bool) – Mark entry as checked (the entry will be crossed out in the UI)
Returns: The updated schedule item
-