ALTER TABLE `payment_button` 
ADD COLUMN `partner_pbn` VARCHAR(200) NULL AFTER `payphone_url_api`;

UPDATE `payment_button` SET `partner_pbn`='Placetopay' WHERE `serial_pbn`='6';
UPDATE `payment_button` SET `partner_pbn`='Placetopay' WHERE `serial_pbn`='7';
UPDATE `payment_button` SET `partner_pbn`='Placetopay' WHERE `serial_pbn`='5';
UPDATE `payment_button` SET `partner_pbn`='Placetopay' WHERE `serial_pbn`='16';
UPDATE `payment_button` SET `partner_pbn`='Placetopay' WHERE `serial_pbn`='17';
UPDATE `payment_button` SET `partner_pbn`='Payphone' WHERE `serial_pbn`='10';
UPDATE `payment_button` SET `partner_pbn`='Payphone' WHERE `serial_pbn`='11';
UPDATE `payment_button` SET `partner_pbn`='Payphone' WHERE `serial_pbn`='12';
UPDATE `payment_button` SET `partner_pbn`='Payphone' WHERE `serial_pbn`='13';
UPDATE `payment_button` SET `partner_pbn`='Payphone' WHERE `serial_pbn`='14';


INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('754', '402', 'Reporte de cuadre de caja', 'laravel/public/reportPayments', '1.00', 'LOCKABLE');
insert into allowed_pages_by_process values(754,'reportpaymentscontroller@getindex');
insert into allowed_pages_by_process values(754,'reportpaymentscontroller@postdates');
insert into allowed_pages_by_process values(754,'reportpaymentscontroller@postreport');


INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('755', '402', 'Reporte de cuadre de caja por usuario', 'laravel/public/reportPayments/index-user', '1.00', 'LOCKABLE');
insert into allowed_pages_by_process values(755,'reportpaymentscontroller@getIndexUser');
insert into allowed_pages_by_process values(755,'reportpaymentscontroller@postReportUser');

ALTER TABLE `credit_note` 
ENGINE = InnoDB ,
ADD COLUMN `serial_fin` INT NULL AFTER `updated_at`;

ALTER TABLE `credit_note` 
CHANGE COLUMN `serial_fin` `serial_fin` INT(11) NULL DEFAULT NULL AFTER `serial_usr`,
ADD INDEX `fk_cdt_fin_idx` (`serial_fin` ASC);
ALTER TABLE `credit_note` 
ADD CONSTRAINT `fk_cdt_fin`
  FOREIGN KEY (`serial_fin`)
  REFERENCES `financial_institution` (`serial_fin`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
  
  ALTER TABLE `credit_note` 
ADD COLUMN `acont_type` VARCHAR(45) NULL AFTER `serial_usr`,
ADD COLUMN `acount_type` ENUM('CURRENT', 'SAVINGS') NULL AFTER `serial_usr_returned`;

ALTER TABLE `credit_note` 
ADD COLUMN `acount_cdt` VARCHAR(200) NULL AFTER `acount_type`;

ALTER TABLE `credit_note` 
ADD COLUMN `identification_type` ENUM('CC', 'RUC', 'PP') NULL AFTER `updated_at`;
ALTER TABLE `credit_note` 
CHANGE COLUMN `identification_type` `identification_type_cdt` ENUM('CC', 'RUC', 'PP') NULL DEFAULT NULL AFTER `acount_cdt`;

ALTER TABLE `credit_note` 
ADD COLUMN `email_cdt` VARCHAR(200) NULL AFTER `identification_type_cdt`;

ALTER TABLE `credit_note` 
ADD COLUMN `serial_usr_guardian_cdt` VARCHAR(45) NULL AFTER `email_cdt`,
ADD COLUMN `date_gaurdian_cdt` VARCHAR(45) NULL AFTER `serial_usr_guardian_cdt`,
ADD COLUMN `ip_address_cdt` VARCHAR(45) NULL AFTER `date_gaurdian_cdt`;
ALTER TABLE `credit_note` 
CHANGE COLUMN `date_gaurdian_cdt` `date_gaurdian_cdt` DATETIME NULL DEFAULT NULL ;


INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('759', '156', 'Notas de crédito', 'laravel/public/creditNoteForm', '1', 'LOCKABLE');
insert into allowed_pages_by_process values(759,'creditnoteformcontroller@getindex');
insert into allowed_pages_by_process values(759,'creditnoteformcontroller@postsave');





