Tengo problemas al guardar mi modelo ya que no cuenta con todos los atributos que realmente tiene, este es el objeto:
Tercero Object
(
[_new:CActiveRecord:private] => 1
[_attributes:CActiveRecord:private] => Array
(
[IdTipoDocumento] => 1
[NumeroDocumento] => 14798856
[DigitoVerificacionDocumento] => 3
[IdTipoPersona] => 2
[IdTipoEmpresa] =>
[RazonSocial] =>
[PrimerNombre] => Eddie
[SegundoNombre] =>
[PrimerApellido] => Quintero
[SegundoApellido] =>
[Origen] => 0
[Sigla] => SAS
[IdCiudad] => 135
[DireccionComercial] => qwertyhhgfds
[PaginaWeb] =>
[Email] => qwergfds@dfghj.com
[TerceroInterno] => 1
[TerceroProveedor] => 0
[TerceroCliente] => 0
[IdTipoTercero] => 1
[IdRegimenTercero] =>
[Autoretenedor] => 0
[PorcentajeRetencion] =>
[NumeroResolucionAutoretenedor] =>
[NumeroOFAC] =>
[FechaVencimientoOFAC] =>
[CamaraComercioNumeroRegisto] =>
[CamaraComercioIdCiudadExpedicion] =>
[CamaraComercioNumeroEscritura] =>
[CamaraComercioNotaria] =>
[IdCategoriaTributaria] =>
[Domiciliado] => 0
[ImpuestoIncluido] => 0
[PagaFlete] => 0
[PromedioTiempoEntrega] => 23
[ManejaDevolucion] => 0
[DeclaraImpuesto] => 0
[SolicitudEnPOS] => 0
[PagoEnPOS] => 0
[PublicidadEnPOS] => 0
[ExhibidorEnPOS] => 0
[MercaderistaEnPOS] => 0
[CodigoActividadEconomica] => 0240
[Observaciones] =>
)
[_related:CActiveRecord:private] => Array
(
)
[_c:CActiveRecord:private] =>
[_pk:CActiveRecord:private] =>
[_alias:CActiveRecord:private] => t
[_errors:CModel:private] => Array
(
)
[_validators:CModel:private] => CList Object
(
[_d:CList:private] => Array
(
[0] => CRequiredValidator Object
(
[requiredValue] =>
[strict] =>
[trim] => 1
[attributes] => Array
(
[0] => IdTipoDocumento
[1] => NumeroDocumento
[2] => DigitoVerificacionDocumento
[3] => IdTipoPersona
[4] => Sigla
[5] => IdCiudad
[6] => DireccionComercial
[7] => Email
[8] => IdTipoTercero
[9] => PromedioTiempoEntrega
[10] => logFecha
[11] => IdUsuario
[12] => CodigoActividadEconomica
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[1] => CNumberValidator Object
(
[integerOnly] => 1
[allowEmpty] => 1
[max] =>
[min] =>
[tooBig] =>
[tooSmall] =>
[integerPattern] => /^\s*[+-]?\d+\s*$/
[numberPattern] => /^\s*[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\s*$/
[attributes] => Array
(
[0] => IdTipoDocumento
[1] => IdTipoPersona
[2] => IdTipoEmpresa
[3] => Origen
[4] => IdCiudad
[5] => IdTipoTercero
[6] => TerceroInterno
[7] => TerceroProveedor
[8] => TerceroCliente
[9] => IdRegimenTercero
[10] => Autoretenedor
[11] => DeclaraImpuesto
[12] => CamaraComercioIdCiudadExpedicion
[13] => Domiciliado
[14] => ImpuestoIncluido
[15] => IdCategoriaTributaria
[16] => PagaFlete
[17] => ManejaDevolucion
[18] => PromedioTiempoEntrega
[19] => SolicitudEnPOS
[20] => PagoEnPOS
[21] => PublicidadEnPOS
[22] => ExhibidorEnPOS
[23] => MercaderistaEnPOS
[24] => CalificacionTotalidadEntrega
[25] => CalificacionTiempoEntrega
[26] => IdUsuario
[27] => Estado
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[2] => CNumberValidator Object
(
[integerOnly] =>
[allowEmpty] => 1
[max] =>
[min] =>
[tooBig] =>
[tooSmall] =>
[integerPattern] => /^\s*[+-]?\d+\s*$/
[numberPattern] => /^\s*[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\s*$/
[attributes] => Array
(
[0] => PorcentajeRetencion
[1] => NivelDeServicio
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[3] => CStringValidator Object
(
[max] => 45
[min] =>
[is] =>
[tooShort] =>
[tooLong] =>
[allowEmpty] => 1
[encoding] =>
[attributes] => Array
(
[0] => NumeroDocumento
[1] => RazonSocial
[2] => PrimerNombre
[3] => SegundoNombre
[4] => PrimerApellido
[5] => SegundoApellido
[6] => Sigla
[7] => PaginaWeb
[8] => Email
[9] => NumeroResolucionAutoretenedor
[10] => NumeroOFAC
[11] => CamaraComercioNumeroRegisto
[12] => CamaraComercioNumeroEscritura
[13] => CamaraComercioNotaria
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[4] => CStringValidator Object
(
[max] => 2
[min] =>
[is] =>
[tooShort] =>
[tooLong] =>
[allowEmpty] => 1
[encoding] =>
[attributes] => Array
(
[0] => DigitoVerificacionDocumento
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[5] => CStringValidator Object
(
[max] => 150
[min] =>
[is] =>
[tooShort] =>
[tooLong] =>
[allowEmpty] => 1
[encoding] =>
[attributes] => Array
(
[0] => DireccionComercial
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[6] => CStringValidator Object
(
[max] => 10
[min] =>
[is] =>
[tooShort] =>
[tooLong] =>
[allowEmpty] => 1
[encoding] =>
[attributes] => Array
(
[0] => CodigoActividadEconomica
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[7] => CSafeValidator Object
(
[attributes] => Array
(
[0] => FechaVencimientoOFAC
[1] => Observaciones
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[8] => CSafeValidator Object
(
[attributes] => Array
(
[0] => IdTercero
[1] => IdTipoDocumento
[2] => NumeroDocumento
[3] => DigitoVerificacionDocumento
[4] => IdTipoPersona
[5] => IdTipoEmpresa
[6] => RazonSocial
[7] => PrimerNombre
[8] => SegundoNombre
[9] => PrimerApellido
[10] => SegundoApellido
[11] => Sigla
[12] => Origen
[13] => IdCiudad
[14] => DireccionComercial
[15] => PaginaWeb
[16] => Email
[17] => IdTipoTercero
[18] => TerceroInterno
[19] => TerceroProveedor
[20] => TerceroCliente
[21] => IdRegimenTercero
[22] => Autoretenedor
[23] => PorcentajeRetencion
[24] => NumeroResolucionAutoretenedor
[25] => DeclaraImpuesto
[26] => NumeroOFAC
[27] => FechaVencimientoOFAC
[28] => CamaraComercioNumeroRegisto
[29] => CamaraComercioFechaExpedicion
[30] => CamaraComercioIdCiudadExpedicion
[31] => CamaraComercioFechaVencimiento
[32] => CamaraComercioNumeroEscritura
[33] => CamaraComercioNotaria
[34] => CamaraComercioFechaConstitucionEmpresa
[35] => CodigoActividadEconomica
[36] => Domiciliado
[37] => ImpuestoIncluido
[38] => IdCategoriaTributaria
[39] => PagaFlete
[40] => ManejaDevolucion
[41] => PromedioTiempoEntrega
[42] => SolicitudEnPOS
[43] => PagoEnPOS
[44] => PublicidadEnPOS
[45] => ExhibidorEnPOS
[46] => MercaderistaEnPOS
[47] => CalificacionTotalidadEntrega
[48] => CalificacionTiempoEntrega
[49] => NivelDeServicio
[50] => Observaciones
[51] => logFecha
[52] => IdUsuario
[53] => Estado
)
[message] =>
[skipOnError] =>
[on] => Array
(
[search] => search
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[9] => CInlineValidator Object
(
[method] => verificacionTipoPersona
[params] => Array
(
)
[clientValidate] =>
[attributes] => Array
(
[0] => IdTipoPersona
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
)
[_c:CList:private] => 10
[_r:CList:private] =>
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[_scenario:CModel:private] => insert
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
NO GUARDO EL TERCEROTelefonoTercero Object
(
[_new:CActiveRecord:private] => 1
[_attributes:CActiveRecord:private] => Array
(
[IdTercero] =>
[IdTipoTelefono] => 2
[Numero] => 32456789
[Estado] => 1
)
[_related:CActiveRecord:private] => Array
(
)
[_c:CActiveRecord:private] =>
[_pk:CActiveRecord:private] =>
[_alias:CActiveRecord:private] => t
[_errors:CModel:private] => Array
(
)
[_validators:CModel:private] => CList Object
(
[_d:CList:private] => Array
(
[0] => CRequiredValidator Object
(
[requiredValue] =>
[strict] =>
[trim] => 1
[attributes] => Array
(
[0] => IdTercero
[1] => IdTipoTelefono
[2] => Numero
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[1] => CNumberValidator Object
(
[integerOnly] => 1
[allowEmpty] => 1
[max] =>
[min] =>
[tooBig] =>
[tooSmall] =>
[integerPattern] => /^\s*[+-]?\d+\s*$/
[numberPattern] => /^\s*[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\s*$/
[attributes] => Array
(
[0] => IdTercero
[1] => IdTipoTelefono
[2] => Estado
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[2] => CStringValidator Object
(
[max] => 45
[min] =>
[is] =>
[tooShort] =>
[tooLong] =>
[allowEmpty] => 1
[encoding] =>
[attributes] => Array
(
[0] => Numero
)
[message] =>
[skipOnError] =>
[on] => Array
(
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[3] => CSafeValidator Object
(
[attributes] => Array
(
[0] => IdTelefonoTercero
[1] => IdTercero
[2] => IdTipoTelefono
[3] => Numero
[4] => Estado
)
[message] =>
[skipOnError] =>
[on] => Array
(
[search] => search
)
[except] => Array
(
)
[safe] => 1
[enableClientValidation] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
)
[_c:CList:private] => 4
[_r:CList:private] =>
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
[_scenario:CModel:private] => insert
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
y esta la tabla relacionada:
`m_Tercero` (
`IdTercero` int(11) NOT NULL AUTO_INCREMENT,
`IdTipoDocumento` int(11) NOT NULL,
`NumeroDocumento` varchar(45) NOT NULL,
`DigitoVerificacionDocumento` varchar(2) NOT NULL,
`IdTipoPersona` int(11) NOT NULL,
`IdTipoEmpresa` int(11) DEFAULT NULL,
`RazonSocial` varchar(45) DEFAULT NULL,
`PrimerNombre` varchar(45) DEFAULT NULL,
`SegundoNombre` varchar(45) DEFAULT NULL,
`PrimerApellido` varchar(45) DEFAULT NULL,
`SegundoApellido` varchar(45) DEFAULT NULL,
`Sigla` varchar(45) NOT NULL,
`Origen` tinyint(1) DEFAULT NULL COMMENT 'Origen del tercero 0:Nacional 1:Extranjera',
`IdCiudad` int(11) NOT NULL,
`DireccionComercial` varchar(150) NOT NULL,
`PaginaWeb` varchar(45) DEFAULT NULL,
`Email` varchar(45) NOT NULL,
`IdTipoTercero` int(11) NOT NULL,
`TerceroInterno` tinyint(1) DEFAULT NULL,
`TerceroProveedor` tinyint(1) DEFAULT NULL,
`TerceroCliente` tinyint(1) DEFAULT NULL,
`IdRegimenTercero` int(11) DEFAULT NULL,
`Autoretenedor` tinyint(1) DEFAULT NULL,
`PorcentajeRetencion` float(3,2) DEFAULT NULL,
`NumeroResolucionAutoretenedor` varchar(45) DEFAULT NULL,
`DeclaraImpuesto` tinyint(1) DEFAULT NULL,
`NumeroOFAC` varchar(45) DEFAULT NULL,
`FechaVencimientoOFAC` date DEFAULT NULL,
`CamaraComercioNumeroRegisto` varchar(45) DEFAULT NULL,
`CamaraComercioFechaExpedicion` date DEFAULT NULL,
`CamaraComercioIdCiudadExpedicion` int(11) DEFAULT NULL,
`CamaraComercioFechaVencimiento` date DEFAULT NULL,
`CamaraComercioNumeroEscritura` varchar(45) DEFAULT NULL,
`CamaraComercioNotaria` varchar(45) DEFAULT NULL,
`CamaraComercioFechaConstitucionEmpresa` date DEFAULT NULL,
`CodigoActividadEconomica` varchar(10) NOT NULL,
`Domiciliado` tinyint(1) DEFAULT NULL,
`ImpuestoIncluido` tinyint(1) DEFAULT NULL,
`IdCategoriaTributaria` int(11) DEFAULT NULL,
`PagaFlete` tinyint(1) DEFAULT NULL COMMENT 'Indica que el tercero se encargara del transporte',
`ManejaDevolucion` tinyint(1) DEFAULT NULL,
`PromedioTiempoEntrega` int(11) NOT NULL,
`SolicitudEnPOS` tinyint(1) DEFAULT NULL COMMENT 'Indicador de solicitar los servicios desde un Punto de Venta',
`PagoEnPOS` tinyint(1) DEFAULT NULL,
`PublicidadEnPOS` tinyint(1) DEFAULT NULL COMMENT 'Manejo de publicidad en los puntos de ventas',
`ExhibidorEnPOS` tinyint(1) DEFAULT NULL COMMENT 'Manejo de exhibidor en los puntos de ventas',
`MercaderistaEnPOS` tinyint(1) DEFAULT NULL COMMENT 'Manejo de mercaderista en los puntos de ventas',
`CalificacionTotalidadEntrega` int(11) DEFAULT NULL,
`CalificacionTiempoEntrega` int(11) DEFAULT NULL,
`NivelDeServicio` float(3,2) DEFAULT NULL,
`Observaciones` text,
`logFecha` date NOT NULL,
`IdUsuario` int(11) NOT NULL,
`Estado` tinyint(1) DEFAULT NULL,
)
los atributos marcados con el prefijo de CamaraComercio son 7 y el modelo me omite justo los 3 atributos que son fechas y me sale el siguiente error al tratar de guardar
23:37:21.670754 warning application
Failed to set unsafe attribute "CamaraComercioFechaExpedicion" of
"Tercero".
in
C:\xampp\htdocs\SIIDesarrollo\protected\modules\Tercero\controllers\TerceroController.php
(197)
in C:\xampp\htdocs\SIIDesarrollo\index.php (40)
23:37:21.670845 warning application
Failed to set unsafe attribute "CamaraComercioFechaVencimiento" of
"Tercero".
in
C:\xampp\htdocs\SIIDesarrollo\protected\modules\Tercero\controllers\TerceroController.php
(197)
in C:\xampp\htdocs\SIIDesarrollo\index.php (40)
23:37:21.670938 warning application
Failed to set unsafe attribute "CamaraComercioFechaConstitucionEmpresa" of
"Tercero".
in
C:\xampp\htdocs\SIIDesarrollo\protected\modules\Tercero\controllers\TerceroController.php
(197)
in C:\xampp\htdocs\SIIDesarrollo\index.php (40)
si de pronto no me exprese claramente me lo comunican.
de antemano muchas gracias.