CREATE TABLE IF NOT EXISTS `vn`.`mrwConfig` (
	`id` INT auto_increment NULL,
	`url` varchar(100) NULL,
	`user` varchar(100) NULL,
	`password` varchar(100) NULL,
	`franchiseCode` varchar(100) NULL,
	`subscriberCode` varchar(100) NULL,
	CONSTRAINT mrwConfig_pk PRIMARY KEY (id)
)
ENGINE=InnoDB 
DEFAULT CHARSET=utf8mb3
COLLATE=utf8mb3_unicode_ci;

ALTER TABLE `vn`.`packingSite` ADD `hasNewLabelMrwMethod` BOOL NULL;


INSERT INTO `vn`.`agency` (`name`,`warehouseFk`,`warehouseAliasFk`,`isOwn`,`isAnyVolumeAllowed`)
	VALUES ('MRW',1,1,0,0);

INSERT INTO `vn`.`agencyMode` (`id`, `name`, `description`, `deliveryMethodFk`, `m3`, `web`, `agencyFk`, `inflation`, `isVolumetric`, `reportMail`, `showAgencyName`, `isActive`, `isExternalAgency`, `flag`, `code`, `isRiskFree`, `hasWeightVolumetric`)
	VALUES(26, 'MRW', NULL, NULL, 0.0, 0, 11, 0.00, 0, NULL, 1, 1, 0, NULL, 'MRW', 0, 0),
		(27, 'mrwEcom', NULL, NULL, 0.0, 0, 11, 0.00, 0, NULL, 1, 1, 0, NULL, 'mrwEcom', 0, 0);

INSERT INTO `vn`.`mrwConfig` (`url`, `user`, `password`, `franchiseCode`, `subscriberCode`)
	VALUES ('https://sagec-test.mrw.es/MRWEnvio.asmx', '04301SGVERDNATURA', 'Verdnatura@4301V', '04301', '009731');

INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) 
	VALUES('MrwConfig', 'cancelShipment', 'WRITE', 'ALLOW', 'ROLE', 'employee');

INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
	VALUES ('MrwConfig','createShipment','WRITE','ALLOW','ROLE','employee');

INSERT INTO `vn`.`mrwService` (`agencyModeCodeFk`, `clientType`, `serviceType`, `kg`) VALUES('MRW', 9731, 205, 10);
INSERT INTO `vn`.`mrwServiceWeekday` (`agencyModeCodeFk`, `weekdays`, `serviceType`, `params`) VALUES('mrwEcom', 'sat', 800, 'EntregaSabado=S');


