Change status into business naming driven

This commit is contained in:
CIEF ACC1
2023-11-22 16:13:47 +00:00
parent 8feb447f89
commit 01fa0f61d6
@@ -293,6 +293,8 @@ transaction_costs_lists AS (
transaction_type, transaction_type,
payment_method, payment_method,
status, status,
cost_document_type,
cost_document_status,
payment_reference, payment_reference,
bill_number, bill_number,
base_value, base_value,
@@ -322,14 +324,13 @@ transaction_costs_lists AS (
deleted_datetime, deleted_datetime,
created_datetime, created_datetime,
updated_datetime, updated_datetime,
cost_document_created_datetime,
cost_document_updated_datetime,
cost_created_datetime, cost_created_datetime,
cost_completed_datetime, cost_completed_datetime,
cost_pending_submission_datetime, cost_pending_submission_datetime,
cost_approved_datetime, cost_approved_datetime,
cost_pending_verification_datetime, cost_pending_verification_datetime
cost_rejected_datetime,
cost_suspended_datetime,
cost_expired_datetime
FROM transaction_costs FROM transaction_costs
@@ -444,12 +445,15 @@ bookings_orders_costs_join AS (
transaction_costs_lists.tax_rm AS cost_tax_rm, transaction_costs_lists.tax_rm AS cost_tax_rm,
transaction_costs_lists.service_charge_rm AS cost_service_charge_rm, transaction_costs_lists.service_charge_rm AS cost_service_charge_rm,
transaction_costs_lists.total_value_rm AS total_cost_value_rm, transaction_costs_lists.total_value_rm AS total_cost_value_rm,
transaction_costs_lists.cost_document_type,
transaction_costs_lists.cost_document_status,
transaction_costs_lists.cost_created_datetime, transaction_costs_lists.cost_created_datetime,
transaction_costs_lists.cost_pending_submission_datetime, transaction_costs_lists.cost_pending_submission_datetime,
transaction_costs_lists.cost_pending_verification_datetime, transaction_costs_lists.cost_pending_verification_datetime,
transaction_costs_lists.cost_approved_datetime, transaction_costs_lists.cost_approved_datetime,
transaction_costs_lists.cost_completed_datetime, transaction_costs_lists.cost_completed_datetime,
transaction_costs_lists.cost_rejected_datetime transaction_costs_lists.cost_document_created_datetime,
transaction_costs_lists.cost_document_updated_datetime
FROM transaction_orders_lists FROM transaction_orders_lists
@@ -554,7 +558,10 @@ renaming_datetime_columns AS (
order_approved_datetime AS account_verified_payment_datetime, order_approved_datetime AS account_verified_payment_datetime,
order_completed_datetime AS first_white_form_generated_datetime, order_completed_datetime AS first_white_form_generated_datetime,
cost_pending_verification_datetime AS last_white_form_generated_datetime, cost_pending_verification_datetime AS last_white_form_generated_datetime,
COALESCE(cost_approved_datetime, cost_completed_datetime) AS operation_uploaded_bank_slip_datetime, COALESCE(
cost_document_created_datetime,
cost_approved_datetime,
cost_completed_datetime) AS operation_uploaded_bank_slip_datetime,
purchase_order_created_datetime AS first_purchase_order_uploaded_datetime, purchase_order_created_datetime AS first_purchase_order_uploaded_datetime,
purchase_order_updated_datetime AS last_purchase_order_uploaded_datetime, purchase_order_updated_datetime AS last_purchase_order_uploaded_datetime,
invoice_created_datetime AS operation_generated_invoice_datetime, invoice_created_datetime AS operation_generated_invoice_datetime,
@@ -608,6 +615,8 @@ final_fct_exchange__new_orders AS (
cost_status, cost_status,
cost_payment_reference, cost_payment_reference,
cost_bill_number, cost_bill_number,
cost_document_type,
cost_document_status,
purchase_order_status, purchase_order_status,
purchase_order_number, purchase_order_number,
invoice_status, invoice_status,
@@ -656,12 +665,13 @@ final_fct_exchange__new_orders AS (
order_suspended_datetime, order_suspended_datetime,
order_expired_datetime, order_expired_datetime,
cost_document_created_datetime,
cost_document_updated_datetime,
cost_created_datetime, cost_created_datetime,
cost_pending_submission_datetime, cost_pending_submission_datetime,
cost_pending_verification_datetime, cost_pending_verification_datetime,
cost_approved_datetime, cost_approved_datetime,
cost_completed_datetime, cost_completed_datetime,
cost_rejected_datetime,
customer_made_booking_datetime, customer_made_booking_datetime,
customer_placed_order_datetime, customer_placed_order_datetime,