23-06-2026
ALTER TABLE `quo_quotation_management`
ADD COLUMN `quot_pdf_footer_text` LONGTEXT NULL DEFAULT NULL AFTER `std_delivery_cost`;

ALTER TABLE `quo_quotation_management_history`
ADD COLUMN `quot_pdf_footer_text` LONGTEXT NULL DEFAULT NULL AFTER `std_delivery_cost`;

ALTER TABLE `quo_quotation_management` CHANGE `quot_pdf_footer_text` `payment_terms_days` INT NULL DEFAULT NULL;

ALTER TABLE `quo_quotation_management_history` CHANGE `quot_pdf_footer_text` `payment_terms_days` INT NULL DEFAULT NULL;


19-06-2026
ALTER TABLE quo_quotation_management
    CHANGE COLUMN std_fittings_labour std_fittings_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_fittings_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_fittings_labour_hours,
    ADD COLUMN std_fittings_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_fittings_material;


ALTER TABLE quo_quotation_management
    CHANGE COLUMN std_cleats_labour std_cleats_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_cleats_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_cleats_labour_hours,
    ADD COLUMN std_cleats_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_cleats_material;


ALTER TABLE quo_quotation_management
    CHANGE COLUMN std_section_labour std_section_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_section_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_section_labour_hours,
    ADD COLUMN std_section_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_section_material;

ALTER TABLE quo_quotation_management
    CHANGE COLUMN std_hollow_labour std_hollow_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_hollow_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_hollow_labour_hours,
    ADD COLUMN std_hollow_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_hollow_material;


ALTER TABLE quo_quotation_management
    CHANGE COLUMN sec_saw_labour sec_saw_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN sec_saw_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER sec_saw_labour_hours,
    ADD COLUMN sec_saw_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER sec_saw_material;

ALTER TABLE quo_quotation_management
    CHANGE COLUMN std_fabrication_labour std_fabrication_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_fabrication_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_fabrication_labour_hours;


ALTER TABLE quo_quotation_management
    CHANGE COLUMN misc_labour misc_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN misc_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER misc_labour_hours,
    ADD COLUMN misc_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER misc_material;

ALTER TABLE quo_quotation_management
    CHANGE COLUMN std_painting_labour std_painting_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_painting_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_painting_labour_hours,
    ADD COLUMN std_painting_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_painting_material;

ALTER TABLE quo_quotation_management
    CHANGE COLUMN std_powder_coating_labour std_powder_coating_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_powder_coating_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_powder_coating_labour_hours,
    ADD COLUMN std_powder_coating_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_powder_coating_material;


ALTER TABLE quo_quotation_management_history
    CHANGE COLUMN std_fittings_labour std_fittings_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_fittings_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_fittings_labour_hours,
    ADD COLUMN std_fittings_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_fittings_material,

    CHANGE COLUMN std_cleats_labour std_cleats_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_cleats_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_cleats_labour_hours,
    ADD COLUMN std_cleats_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_cleats_material,

    CHANGE COLUMN std_section_labour std_section_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_section_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_section_labour_hours,
    ADD COLUMN std_section_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_section_material,

    CHANGE COLUMN std_hollow_labour std_hollow_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_hollow_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_hollow_labour_hours,
    ADD COLUMN std_hollow_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_hollow_material,

    CHANGE COLUMN sec_saw_labour sec_saw_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN sec_saw_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER sec_saw_labour_hours,
    ADD COLUMN sec_saw_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER sec_saw_material,

    CHANGE COLUMN std_fabrication_labour std_fabrication_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_fabrication_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_fabrication_labour_hours,

    CHANGE COLUMN misc_labour misc_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN misc_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER misc_labour_hours,
    ADD COLUMN misc_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER misc_material,

    CHANGE COLUMN std_painting_labour std_painting_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_painting_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_painting_labour_hours,
    ADD COLUMN std_painting_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_painting_material,

    CHANGE COLUMN std_powder_coating_labour std_powder_coating_labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN std_powder_coating_labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER std_powder_coating_labour_hours,
    ADD COLUMN std_powder_coating_free_issue TINYINT(1) NOT NULL DEFAULT 0 AFTER std_powder_coating_material;


ALTER TABLE quo_quote_mapping
    CHANGE COLUMN labour labour_hours DECIMAL(12,2) NULL DEFAULT 0,
    ADD COLUMN labour_charge DECIMAL(12,2) NULL DEFAULT 0 AFTER labour_hours,
    ADD COLUMN qty DECIMAL(12,2) NULL DEFAULT 1 AFTER description,
    ADD COLUMN unit_price DECIMAL(12,2) NULL DEFAULT 0 AFTER labour_charge;


CREATE TABLE IF NOT EXISTS quo_priced_items (
    id INT(11) NOT NULL AUTO_INCREMENT,
    quotation_id INT(11) NOT NULL,
    description TEXT NULL,
    line_total DECIMAL(12,2) NULL DEFAULT 0,
    created_by INT(11) NULL,
    created_on DATETIME NULL,
    updated_by INT(11) NULL,
    updated_on DATETIME NULL,
    PRIMARY KEY (id),
    KEY quotation_id (quotation_id)
) ;

ALTER TABLE quo_item_mapping
    MODIFY COLUMN line_total DECIMAL(12,2) NULL DEFAULT NULL;

