Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTHAB-185: Implement invoicing and payment statuses for quotations #975

Merged
merged 14 commits into from
Sep 21, 2023

Conversation

erawat
Copy link
Member

@erawat erawat commented Sep 20, 2023

Overview

This pull request:

  • Add invoicing status and payment status to the CaseSalesOrder entity.
  • Enables on-the-fly calculation of the total invoicing amount and total paid amount when viewing the quotation.

Before

Didn't exist.

After

Invoice and payment statuses are changed based on contributions and payments

btha

Payment status and invoices status have been added to the quotation list screen.
screenshot-btha localhost_9011-2023 09 21-13_50_15

Technical Details

  • In this pull request, I migrated the Civix files from version 22.05.2 to 23.02.1 in order to regenerate the boilerplate DAO files for the new entities. As a result, I had to make changes in the upgrader files

  • In this commit c1492df, I removed the Step20 upgrader and added its logic to the Step19 upgrader since the extension has not been released. Therefore, we only need one upgrader

  • The payment and invoicing statuses will be calculated based on the statuses of contributions and payments linked to the quotation. These calculations are performed and updated in the CaseSalesOrder entity when:

  • Creating creating a new contribution. babf3a9
  • Updating the quotation 3eab720
  • Creating a payment 9d14012
  • Payment status and invocing status fields are included in the quotation list screen by re-buidling searchkit screen. 5c45257
  • The total invoicing and total paid amount will always be calculated on-the-fly when fetching a Case SalesOrder from the API

Comments

There is a slight issue with the styling of the total invoicing and total paid amount rows, which will be addressed in the next pull request.

@erawat erawat force-pushed the BTHAB-185-display-statuses branch 4 times, most recently from 138e258 to 0e20b36 Compare September 21, 2023 11:27
@@ -174,7 +192,7 @@ public function __construct() {
* Whether to return the plural version of the title.
*/
public static function getEntityTitle($plural = FALSE) {
return $plural ? E::ts('Quotations') : E::ts('Quotation');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's revert this line @erawat

@erawat erawat force-pushed the BTHAB-185-display-statuses branch from 0e20b36 to 6386152 Compare September 21, 2023 13:35
@erawat erawat force-pushed the BTHAB-185-display-statuses branch from 6386152 to 439822b Compare September 21, 2023 13:37
@erawat erawat merged commit 27073c4 into BTHAB-3-workstream Sep 21, 2023
2 checks passed
@erawat erawat deleted the BTHAB-185-display-statuses branch September 21, 2023 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants