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() # create fixed price project project = m.Project.create( name="my fixed price project", currency="EUR", leader_id=1, customer_id=2, fixed_price=True, budget=4000 ).data first_payment = m.ProjectPaymentSchedule.create(project.id, 1000.0, date(2020, 3, 1)) second_payment = m.ProjectPaymentSchedule.create(project.id, 1000.0, date(2020, 6, 1)) third_payment = m.ProjectPaymentSchedule.create(project.id, 1000.0, date(2020, 9, 1)) fourth_payment = m.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 (default
None
) - checked (bool) – Mark entry as checked (the entry will be crossed out in the UI) (default
False
)
Returns: The created schedule item
Return type:
-
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
Return type:
-
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
Return type:
-
getlist
(project_id: int)¶ Retrieve a list of project payment schedules
Parameters: project_id (int) – Project id of the schedule items Returns: List of schedules payments Return type: moco_wrapper.util.response.ListResponse
-
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 (default
None
) - schedule_date (datetime.date, str) – Date the billing will take place (default
None
) - title (str) – Title of the item (default
None
) - checked (bool) – Mark entry as checked (the entry will be crossed out in the UI) (default
None
)
Returns: The updated schedule item
Return type:
-