ALTER TABLE `group_payment_button` 
ADD COLUMN `type_gpb` ENUM('currentDefered', 'current', 'register') NULL DEFAULT 'currentDefered' AFTER `serial_pbn`;

CREATE TABLE `payment_method_wizard` (
  `serial_pmw` INT NOT NULL AUTO_INCREMENT,
  `name_pmw` VARCHAR(300) NULL,
  `alias_pmw` ENUM('currentDefered' ,'current', 'others') NULL,
  `status_pmw` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_pmw`));

ALTER TABLE `group_payment_button` 
ADD COLUMN `serial_pmw` INT NULL AFTER `serial_pbn`,
ADD INDEX `fk_gpb_pmw_idx` (`serial_pmw` ASC);
ALTER TABLE `group_payment_button` 
ADD CONSTRAINT `fk_gpb_pmw`
  FOREIGN KEY (`serial_pmw`)
  REFERENCES `payment_method_wizard` (`serial_pmw`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;


INSERT INTO `payment_method_wizard` (`serial_pmw`, `name_pmw`, `alias_pmw`, `status_pmw`) VALUES ('1', ' Pago en línea todo el año 10 meses sin intereses. ', 'currentDefered', 'ACTIVE');
INSERT INTO `payment_method_wizard` (`serial_pmw`, `name_pmw`, `alias_pmw`, `status_pmw`) VALUES ('2', 'Pago en línea carta de pago 1 de 10', 'current', 'ACTIVE');
INSERT INTO `payment_method_wizard` (`serial_pmw`, `name_pmw`, `alias_pmw`, `status_pmw`) VALUES ('3', ' Contado (efectivo, cheque) \"Por favor imprima el detalle\" ', 'others', 'ACTIVE');



CREATE TABLE `debts_previous_years` (
  `serial_dbt` INT NOT NULL AUTO_INCREMENT,
  `serial_std` INT NULL,
  `comment_dbt` TEXT NULL,
  `debts_dbt` DECIMAL(10,2) NULL,
  `paid_dbf` ENUM('YES', 'NO') NULL,
  `status_dbt` ENUM('ACTIVE', 'INACTIVE','PAID') NULL,
  PRIMARY KEY (`serial_dbt`),
  INDEX `fk_dbt_std_idx` (`serial_std` ASC),
  CONSTRAINT `fk_dbt_std`
    FOREIGN KEY (`serial_std`)
    REFERENCES `student` (`serial_std`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
	
	CREATE TABLE `current_deferred_debts` (
  `serial_crr` INT NOT NULL AUTO_INCREMENT,
  `serial_usr` INT NULL,
  `serial_fic` INT NULL,
  `code_cdd` INT NULL,
  `total_quotas_cdd` INT NULL,
  `quota_amount_cdd` DECIMAL(10,2) NULL,
  `paid_quotas_cdd` INT NULL,
  `last_month_paid_quota_cdd` VARCHAR(3) NULL,
  `owner_cdd` VARCHAR(300) NOT NULL,
  `kinship_cdd` VARCHAR(300) NULL,
  `transaction_date_cdd` TIMESTAMP NULL,
  `students_cdd` VARCHAR(60) NULL,
  `credit_code_cdd` VARCHAR(20) NULL,
  `type_cdd` ENUM('ACADEMIC', 'NON_ACADEMIC') NULL,
  `status_cdd` ENUM('ACTIVE', 'INACTIVE', 'PAID') NULL,
  `confirm_status_cdd` ENUM('NEW', 'PENDING', 'OK', 'KO') NOT NULL,
  PRIMARY KEY (`serial_crr`),
  INDEX `fk_cdd_usr_idx` (`serial_usr` ASC),
  INDEX `fk_relationship_cdd_fic_idx` (`serial_fic` ASC),
  CONSTRAINT `fk_cdd_usr`
    FOREIGN KEY (`serial_usr`)
    REFERENCES `user` (`serial_usr`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_cdd_fic`
    FOREIGN KEY (`serial_fic`)
    REFERENCES `financial_institution_card` (`serial_fic`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
	
	
ALTER TABLE `current_deferred_debts` 
ADD COLUMN `serial_gpb` INT(11) NULL DEFAULT NULL AFTER `confirm_status_cdd`,
ADD INDEX `fk_group_payment_button_cdd_idx` (`serial_gpb` ASC);
ALTER TABLE `current_deferred` 
ADD CONSTRAINT `fk_group_payment_button_cdd`
  FOREIGN KEY (`serial_gpb`)
  REFERENCES `group_payment_button` (`serial_gpb`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
  
  ALTER TABLE `current_deferred` 
ADD COLUMN `card_cdd` VARCHAR(50) NULL DEFAULT NULL AFTER `serial_fic`;

ALTER TABLE `current_deferred_debts` 
CHANGE COLUMN `serial_gpb` `serial_pgb` INT(11) NULL DEFAULT NULL ;

ALTER TABLE `current_deferred_debts` 
ADD CONSTRAINT `fk_cdd_pcg`
  FOREIGN KEY (`serial_pgb`)
  REFERENCES `payment_concept_group` (`serial_pcg`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
  
  ALTER TABLE `debts_previous_years` 
ADD COLUMN `total_debts_dbt` DECIMAL(10,2) NULL AFTER `status_dbt`;


ALTER TABLE `current_deferred_debts` 
CHANGE COLUMN `serial_crr` `serial_cdd` INT(11) NOT NULL AUTO_INCREMENT ;

CREATE TABLE `debts_previous_years_current_deferred` (
  `serial_dcd` INT NOT NULL AUTO_INCREMENT,
  `serial_cdd` INT NULL,
  `serial_dbt` INT NULL,
  `status_dcd` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_dcd`),
  INDEX `fk_dcd_cdd_idx` (`serial_cdd` ASC),
  INDEX `fk_dcd_dbt_idx` (`serial_dbt` ASC),
  CONSTRAINT `fk_dcd_cdd`
    FOREIGN KEY (`serial_cdd`)
    REFERENCES `current_deferred_debts` (`serial_cdd`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_dcd_dbt`
    FOREIGN KEY (`serial_dbt`)
    REFERENCES `debts_previous_years` (`serial_dbt`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
	
	
	CREATE TABLE `payment_detail_debts_previous_years` (
  `serial_pdt` INT NOT NULL ,
  `serial_ttl` INT NULL,
  `serial_pym` INT NULL,
  `serial_ccd` INT NULL,
  `serial_fin` INT NULL,
  `description_pdt` TEXT NULL,
  `num_check_pdt` VARCHAR(45) NULL,
  `account_type_pdt` VARCHAR(45) NULL,
  `city_pdt` VARCHAR(45) NULL,
  `document_number_pdt` VARCHAR(45) NULL,
  `date_year_expire_pdt` VARCHAR(45) NULL,
  `date_month_expire_pdt` VARCHAR(45) NULL,
  `owner_pdt` VARCHAR(45) NULL,
  `amount_pdt` VARCHAR(45) NULL,
  `kinship_pdt` VARCHAR(45) NULL,
  `id_owner_pdt` VARCHAR(45) NULL,
  `cellphone_owner_pdt` VARCHAR(45) NULL,
  `phone_owner_pdt` VARCHAR(45) NULL,
  `email_owner_pdt` VARCHAR(45) NULL,
  `date_pdt` DATETIME NULL,
`address_owner_pdt` TEXT NULL,
  `status_pdt` ENUM('ACTIVE', 'INACTIVE') NULL,
  `serial_usr_create` INT NULL,
  `serial_usr_update` INT NULL,
  `created_at` DATETIME NULL,
  `updated_at` DATETIME NULL
)ENGINE=InnoDB;

ALTER TABLE `payment_detail_debts_previous_years` 
CHANGE COLUMN `serial_pdt` `serial_pdt` INT(11) NOT NULL AUTO_INCREMENT ,
CHANGE COLUMN `serial_ttl` `serial_dbt` INT(11) NULL DEFAULT NULL ,
ADD PRIMARY KEY (`serial_pdt`),
ADD INDEX `fk_pdt_dbt_idx` (`serial_dbt` ASC);
ALTER TABLE `payment_detail_debts_previous_years` 
ADD CONSTRAINT `fk_pdt_dbt`
  FOREIGN KEY (`serial_dbt`)
  REFERENCES `debts_previous_years` (`serial_dbt`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;



ALTER TABLE `debts_previous_years` 
ADD COLUMN `created_at` DATETIME NULL AFTER `total_debts_dbt`,
ADD COLUMN `updated_at` DATETIME NULL AFTER `created_at`;


ALTER TABLE `payment_button` 
ADD COLUMN `debts_pbn` ENUM('YES', 'NO') NULL AFTER `type_pbn`;

INSERT INTO `payment_button` (`serial_pbn`, `serial_crr`, `merchant_name_pbn`, `service_pbn`, `path_logo`, `url_web_page_bank`, `path_terms_conditions`, `info_pbn`, `vpos_url_pbn`, `url_return`, `login`, `trankey`, `type_pbn`, `debts_pbn`) VALUES ('7', '47', 'U.E. Tomas Moro - Sitio web', 'RUBROS ACADEMICOS', 'img/payment_button/placetopay.jpg', 'https://placetopay.ec/', 'files/TCUETM.txt', '<h4>Placetopay</h>', 'https://secure.placetopay.ec/redirection', 'https://learnbox.tomasmoro.k12.ec/learnbox/modules/registration_process_wizard/payment_buttons/placetopay/fReturn', 'fe39b2fd1241360153aa1aa74457d7c8', 'V6ZxzTZS54Qylv8f', 'WALLET_P2P', 'YES');

ALTER TABLE `current_deferred_debts` 
DROP FOREIGN KEY `fk_cdd_pcg`;
ALTER TABLE `current_deferred_debts` 
CHANGE COLUMN `serial_pgb` `serial_pbn` INT(11) NULL DEFAULT NULL ,
ADD INDEX `fk_cdd_pbn_idx` (`serial_pbn` ASC),
DROP INDEX `fk_group_payment_button_cdd_idx` ;
ALTER TABLE `current_deferred_debts` 
ADD CONSTRAINT `fk_cdd_pbn`
  FOREIGN KEY (`serial_pbn`)
  REFERENCES `payment_button` (`serial_pbn`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

ALTER TABLE `current_deferred_debts` 
ADD COLUMN `serials_dbt` VARCHAR(45) NULL AFTER `serial_pbn`;

ALTER TABLE `current_deferred_debts` 
ADD COLUMN `expiration_date` VARCHAR(100) NULL AFTER `serials_dbt`;

ALTER TABLE `current_deferred_debts` 
ADD COLUMN `requestid` VARCHAR(200) NULL AFTER `expiration_date`;

UPDATE `payment_button` SET `url_return`='http://192.168.56.15/RUTADEMIC/DEV/laravel/public/registrationWizard/return' WHERE `serial_pbn`='7';

ALTER TABLE `current_deferred_debts` 
ADD COLUMN `card_cdf` VARCHAR(45) NULL AFTER `requestid`;

ALTER TABLE `debts_previous_years` 
ADD COLUMN `serial_ttls` TEXT NULL AFTER `total_debts_dbt`;

ALTER TABLE `current_deferred_debts` 
ADD COLUMN `document_ccd` VARCHAR(45) NULL AFTER `card_cdf`;

ALTER TABLE `payment_detail_debts_previous_years` 
ADD COLUMN `payment_date_pdt` DATETIME NULL AFTER `updated_at`;


ALTER TABLE `debts_previous_years_current_deferred` 
ADD COLUMN `created_at` DATETIME NULL AFTER `status_dcd`,
ADD COLUMN `updated_at` DATETIME NULL AFTER `created_at`;



ALTER TABLE `payment_detail_total_invoice` 
ADD COLUMN `serial_pdt_dets` INT NULL AFTER `updated_at`;
ALTER TABLE `payment_detail_total_invoice` 
ADD CONSTRAINT `fk_pst_debt`
  FOREIGN KEY (`serial_pdt`)
  REFERENCES `payment_detail_debts_previous_years` (`serial_pdt`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
  
  ALTER TABLE `current_deferred_debts` 

CHANGE COLUMN `confirm_status_cdd` `confirm_status_cdd` ENUM('NEW', 'PENDING', 'OK', 'KO', 'APPROVED','REJECTED') NOT NULL ;

ALTER TABLE `current_deferred_debts` 
ADD COLUMN `created_at` DATETIME NULL AFTER `document_ccd`,
ADD COLUMN `updated_at` DATETIME NULL AFTER `created_at`,
ADD COLUMN `date_cdd` DATETIME NULL AFTER `updated_at`;

ALTER TABLE `debts_previous_years` 
ADD COLUMN `serial_usr` INT NULL AFTER `serial_std`;
ALTER TABLE `debts_previous_years` 
ADD CONSTRAINT `fk_dbt_usr`
  FOREIGN KEY (`serial_std`)
  REFERENCES `user` (`serial_usr`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

INSERT INTO `registration_process_wizard` (`serial_rpw`, `name_rpw`, `name_page_rpw`, `link_rpw`, `name_icon_no_selected`, `name_icon_selected`, `order_rpw`, `type_rpw`, `status_rpw`) VALUES ('10', 'Deudas', 'debts', 'laravel/public/registrationWizard/debts', 'payYearDebtsNoSelected.png', 'invoiceDataSelected.png', '2', 'ECONOMIC', 'ACTIVE');
UPDATE `registration_process_wizard` SET `order_rpw`='3' WHERE `serial_rpw`='2';
UPDATE `registration_process_wizard` SET `order_rpw`='4' WHERE `serial_rpw`='3';
UPDATE `registration_process_wizard` SET `order_rpw`='5' WHERE `serial_rpw`='4';
UPDATE `registration_process_wizard` SET `order_rpw`='6' WHERE `serial_rpw`='5';
UPDATE `registration_process_wizard` SET `order_rpw`='7' WHERE `serial_rpw`='6';
UPDATE `registration_process_wizard` SET `order_rpw`='8' WHERE `serial_rpw`='7';
UPDATE `registration_process_wizard` SET `order_rpw`='9' WHERE `serial_rpw`='9';
UPDATE `registration_process_wizard` SET `order_rpw`='10' WHERE `serial_rpw`='8';

ALTER TABLE `payment_button` 
CHANGE COLUMN `type_pbn` `type_pbn` ENUM('PAYCLUB', 'ALIGNET', 'WALLET_P2P', 'PAYPHONE') NULL DEFAULT NULL ,
ADD COLUMN `token_payphone_pbn` TEXT NULL AFTER `trankey`;

ALTER TABLE `payment_button` 
ADD COLUMN `payphone_url_api` VARCHAR(500) NULL AFTER `debts_pbn`;
INSERT INTO `payment_button` (`serial_pbn`, `serial_crr`, `merchant_name_pbn`, `service_pbn`, `path_logo`, `url_web_page_bank`, `path_terms_conditions`, `info_pbn`, `vpos_url_pbn`, `url_return`, `login`, `trankey`, `type_pbn`, `debts_pbn`, `payphone_url_api`) VALUES ('10', '47', 'U.E. Tomas Moro - Sitio web', 'DEUDAS', 'img/payment_button/payphone.png', NULL, 'files/TCUETM.txt', NULL, NULL, 'http://192.168.56.15/RUTADEMIC/DEV/laravel/public/registrationWizard/returnpayphone', NULL, NULL, 'PAYPHONE', 'YES', 'https://pay.payphonetodoesposible.com/api/button/Prepare');


ALTER TABLE `current_deferred_debts` 
ADD COLUMN `payphone_id` VARCHAR(200) NULL AFTER `date_cdd`;

ALTER TABLE `current_deferred_debts` 
CHANGE COLUMN `confirm_status_cdd` `confirm_status_cdd` ENUM('NEW', 'PENDING', 'OK', 'KO', 'APPROVED', 'REJECTED', 'CANCELED') NOT NULL ;

ALTER TABLE `current_deferred_debts` 
CHANGE COLUMN `total_quotas_cdd` `total_quotas_cdd` TEXT NULL DEFAULT NULL ;

INSERT INTO `payment_button` (`serial_pbn`, `serial_crr`, `merchant_name_pbn`, `service_pbn`, `path_logo`, `url_web_page_bank`, `path_terms_conditions`, `info_pbn`, `vpos_url_pbn`, `url_return`, `login`, `trankey`, `type_pbn`, `payphone_url_api`) VALUES ('11', '47', 'U.E. Tomas Moro - Sitio web', 'RUBROS ACADEMICOS', 'img/payment_button/payphone.png', NULL, 'files/TCUETM.txt', NULL, NULL, 'https://learnbox.tomasmoro.k12.ec/ruta_test/DEV/modules/registration_process_wizard/payment_buttons/payphone/fReturn', 'a855a6e86b9b077231813d25a1b9946c', 'sTai3Tg998n69w3Y', 'PAYPHONE', 'https://pay.payphonetodoesposible.com/api/button/');
INSERT INTO `payment_button` (`serial_pbn`, `serial_crr`, `merchant_name_pbn`, `service_pbn`, `path_logo`, `url_web_page_bank`, `path_terms_conditions`, `info_pbn`, `vpos_url_pbn`, `url_return`, `login`, `trankey`, `type_pbn`, `payphone_url_api`) VALUES ('12', '47', 'DEHUCI - Sitio Web', 'RUBROS NO ACADÉMICOS', 'img/payment_button/payphone.png', NULL, 'files/TCDEHUCI.txt', NULL, NULL, 'https://learnbox.tomasmoro.k12.ec/ruta_test/DEV/modules/registration_process_wizard/payment_buttons/payphone/fReturn', '87a9363cb243d9a917d422618cc53f51', 'joRODZ26C7o1P92K', 'PAYPHONE', 'https://pay.payphonetodoesposible.com/api/button/');
INSERT INTO `payment_button` (`serial_pbn`, `serial_crr`, `merchant_name_pbn`, `service_pbn`, `path_logo`, `url_web_page_bank`, `path_terms_conditions`, `info_pbn`, `vpos_url_pbn`, `url_return`, `login`, `trankey`, `type_pbn`, `payphone_url_api`) VALUES ('13', '47', 'U.E. Tomas Moro - Sitio web', 'RUBROS ACADEMICOS', 'img/payment_button/payphone.png', NULL, 'files/TCUETM.txt', NULL, NULL, 'https://learnbox.tomasmoro.k12.ec/ruta_test/DEV/modules/registration_process_wizard/payment_buttons/payphone/fReturn', 'a855a6e86b9b077231813d25a1b9946c', 'sTai3Tg998n69w3Y', 'PAYPHONE', 'https://pay.payphonetodoesposible.com/api/button/');
INSERT INTO `payment_button` (`serial_pbn`, `serial_crr`, `merchant_name_pbn`, `service_pbn`, `path_logo`, `url_web_page_bank`, `path_terms_conditions`, `info_pbn`, `vpos_url_pbn`, `url_return`, `login`, `trankey`, `type_pbn`, `payphone_url_api`) VALUES ('14', '47', 'DEHUCI - Sitio Web', 'RUBROS NO ACADÉMICOS', 'img/payment_button/payphone.png', NULL, 'files/TCDEHUCI.txt', NULL, NULL, 'https://learnbox.tomasmoro.k12.ec/ruta_test/DEV/modules/registration_process_wizard/payment_buttons/payphone/fReturn', '87a9363cb243d9a917d422618cc53f51', 'joRODZ26C7o1P92K', 'PAYPHONE', 'https://pay.payphonetodoesposible.com/api/button/');
UPDATE `payment_button` SET `token_payphone_pbn`='BHR5rvrMeDiEsVFFHC26U9FC55KTUMncrP7A5KXvwbXErs16Ed9yE45YnOMMh1751DWdergDr8qnJH9p1B0__KhGzoJ2UIwd_NpC8gWzHqS8gkFprKpyKs2X3p3LisxiMs3ZpsIVx4a7QawXf3YsKJDsBtixxasKar_oWB_jVuAigRff0hHwpXGE-J6MV9UjhD2ef-SB7M3MEZB6ck7yV0ceOSsU38uU7XFZyyJoc22uP8tjA0qGtXd1biZo238GPhWsP-8mjosGK8lkC6VBgMNAdpFCBruKCIcvKpnP3oJwAN1DK6B1ftEERJ7kOWDuG6PVaw' WHERE `serial_pbn`='11';
UPDATE `payment_button` SET `token_payphone_pbn`='uYaZRRQHvVDlLW6Y7UsqdBS8johcZeiF9d9fv-BLS-h8ism-Fy-L0BZA-kDYEnrfwVY6WSboEcCqoopPiyi77ZbtxzfKPB2I_lYxXTKqNRM74h4nk4gOV7FmgJa0dW-4bo9WLSlqOZ8FjxzyjnqxFyldhgDlfevNmnSmWeX2I2iq_KuwlaW6qnN6YzxQmAoLaoLDfmd9hDq45SHylsKLKqbKZXBXTNsTd9yA8djW5qxUErP507iHyIEb4Frc6G5qYE3AOba-Nc6xfFzOZzCRI9In5a9do1IPgUzALUNJYL9fM2VVp0pneORejaTh1xupCFAtSg' WHERE `serial_pbn`='12';


UPDATE `payment_button` SET `login`='b5605a60-4269-4006-a858-1cdc30035f92', `trankey`=NULL WHERE `serial_pbn`='11';
UPDATE `payment_button` SET `login`='b5605a60-4269-4006-a858-1cdc30035f92', `trankey`=NULL WHERE `serial_pbn`='12';
UPDATE `payment_button` SET `login`='b5605a60-4269-4006-a858-1cdc30035f92', `trankey`=NULL WHERE `serial_pbn`='13';
UPDATE `payment_button` SET `login`='b5605a60-4269-4006-a858-1cdc30035f92', `trankey`=NULL WHERE `serial_pbn`='14';


ALTER TABLE `payment_concept_group` 
ADD COLUMN `description_name_pcg` VARCHAR(45) NULL AFTER `ruc_pcg`;

UPDATE `payment_concept_group` SET `description_name_pcg`='UETM' WHERE `serial_pcg`='1';
UPDATE `payment_concept_group` SET `description_name_pcg`='DEHUCI' WHERE `serial_pcg`='2';

INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`, `id_exclusion`) VALUES ('743', '156', 'Deudas de años  anteriores', 'laravel/public/debtsPrevious', '1.00', 'LOCKABLE', NULL);
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@getindex');
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@getstudents');
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@postsave');
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@postrecover');
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@postmethoddata');
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@postsaverecover');
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@postreceipt');
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@posttotalpaid');
insert into allowed_pages_by_process values (743,'debtspreviousyearscontroller@postpaymentdetail');

ALTER TABLE `school_setup` 
ADD COLUMN `fcaq_payment_button_sst` VARCHAR(200) NULL AFTER `help_desck_sst`;
-- update school_setup set fcaq_payment_button_sst='files/FAQ_TM.txt';

INSERT INTO `learnboxbotton`.`payment_button` (`serial_pbn`, `serial_crr`, `merchant_name_pbn`, `service_pbn`, `path_logo`, `url_web_page_bank`, `path_terms_conditions`, `info_pbn`, `vpos_url_pbn`, `url_return`, `login`, `trankey`, `type_pbn`) VALUES ('16', '47', 'U.E. Tomas Moro - Sitio web', 'RUBROS ACADEMICOS CORRIENTE', 'img/payment_button/placetopay-logo.png', 'https://placetopay.ec/', 'files/TCUETM.txt', '<h4>Placetopay</h>', 'https://test.placetopay.ec/redirection/', 'https://learnbox.tomasmoro.k12.ec/learboxbutton/modules/registration_process_wizard/payment_buttons/placetopay/fReturn', 'a855a6e86b9b077231813d25a1b9946c', 'sTai3Tg998n69w3Y', 'WALLET_P2P');
INSERT INTO `learnboxbotton`.`payment_button` (`serial_pbn`, `serial_crr`, `merchant_name_pbn`, `service_pbn`, `path_logo`, `url_web_page_bank`, `path_terms_conditions`, `info_pbn`, `vpos_url_pbn`, `url_return`, `login`, `trankey`, `type_pbn`) VALUES ('17', '47', 'DEHUCI - Sitio Web', 'RUBROS NO ACADÉMICOS CORREINTE', 'img/payment_button/placetopay-logo.png', 'https://placetopay.ec/', 'files/TCDEHUCI.txt', '<h4>Placetopay</h>', 'https://test.placetopay.ec/redirection/', 'https://learnbox.tomasmoro.k12.ec/learboxbutton/modules/registration_process_wizard/payment_buttons/placetopay/fReturn', '87a9363cb243d9a917d422618cc53f51', 'joRODZ26C7o1P92K', 'WALLET_P2P');
UPDATE `learnboxbotton`.`payment_button` SET `path_logo`='img/payment_button/placetopay-logo.png', `vpos_url_pbn`='https://test.placetopay.ec/redirection/', `url_return`='https://learnbox.tomasmoro.k12.ec/learboxbutton/modules/registration_process_wizard/payment_buttons/placetopay/fReturn', `login`='a855a6e86b9b077231813d25a1b9946c', `trankey`='sTai3Tg998n69w3Y' WHERE `serial_pbn`='5';
UPDATE `learnboxbotton`.`payment_button` SET `path_logo`='img/payment_button/placetopay-logo.png', `vpos_url_pbn`='https://test.placetopay.ec/redirection/', `url_return`='https://learnbox.tomasmoro.k12.ec/learboxbutton/modules/registration_process_wizard/payment_buttons/placetopay/fReturn', `login`='87a9363cb243d9a917d422618cc53f51', `trankey`='joRODZ26C7o1P92K' WHERE `serial_pbn`='6';


INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `status_prc`) VALUES ('746', '156', 'Reportes', '#', 'LOCKABLE');
INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('747', '746', 'Reporte de deudores', 'laravel/public/reportdebtor', '1', 'LOCKABLE');
insert into allowed_pages_by_process values (747,'reportdebtorcontroller@getindex');
insert into allowed_pages_by_process values (747,'reportdebtorcontroller@postdates');
insert into allowed_pages_by_process values (747,'reportdebtorcontroller@postreport');

ALTER TABLE `current_deferred_debts` 
ADD COLUMN `banck_cdd` VARCHAR(200) NULL AFTER `payphone_id`,
ADD COLUMN `last_digits_card_ccd` VARCHAR(45) NULL AFTER `banck_cdd`;

ALTER TABLE `current_deferred` 
ADD COLUMN `banck_cdf` VARCHAR(200) NULL AFTER `expiration_date`,
ADD COLUMN `last_digits_card_cdf` VARCHAR(45) NULL AFTER `banck_cdf`;

ALTER TABLE `school_setup` 
ADD COLUMN `web_contract_services_sst` VARCHAR(400) NULL AFTER `time_unit`;

update school_setup set web_contract_services_sst = '<a href="https://www.tomasmoro.ec/contrato-servicios-educativos/" target="_blank">Contacto de servicios educativos </a>'

