示例#1
0
void SingleScoreRankView::onEnter()
{
    CCNode::onEnter();
    if (SType == 1) {
        setTitleName(_lang("150363"));
    }else if (SType == 0) {
        setTitleName(_lang("150308"));
    }else if (SType == 2) {
        setTitleName(_lang("150467"));
    }else if (SType == 3) {
        setTitleName(_lang("150455"));
    }
}
示例#2
0
/** inicializa todos los componentes de la clase.
    Resetea el sistema de control de cambios para que considere que no hay cambios por parte del usuario.
    Mete la ventana en el workSpace.
*/
ConvocatoriaView::ConvocatoriaView ( BfCompany *comp, QWidget *parent )
        : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    try {
        setupUi ( this );
        blCenterOnScreen ( this );

        setTitleName ( _ ( "Convocatoria" ) );
        setDbTableName ( "actividad" );
        setDbFieldId ( "idactividad" );
        addDbField ( "idactividad", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "ID actividad" ) );
        addDbField ( "nombreactividad", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Nombre del actividad" ) );
        addDbField ( "idprofesor", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Id profesor" ) );

        insertWindow ( windowTitle(), this, false );

        /// Establecemos los parametros de busqueda de Profesor
        mui_idprofesor->setMainCompany ( comp );
        mui_idprofesor->setLabel ( _ ( "Profesor:" ) );
        mui_idprofesor->setTableName ( "profesor" );
        mui_idprofesor->m_valores["nombreprofesor"] = "";


        pintar();
        dialogChanges_readValues();
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear el actividad" ), this );
    } // end try
    
}
示例#3
0
/** inicializa todos los componentes de la clase.
    Resetea el sistema de control de cambios para que considere que no hay cambios por parte del usuario.
    Mete la ventana en el workSpace.
*/
ReciboView::ReciboView ( BfCompany *comp, QWidget *parent ) : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG

    setAttribute ( Qt::WA_DeleteOnClose );

    try {
        setupUi ( this );
        blCenterOnScreen ( this );

        setTitleName ( _ ( "Recibo" ) );
        setDbTableName ( "recibo" );
        setDbFieldId ( "idrecibo" );
        addDbField ( "idrecibo", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "ID recibo" ) );
        addDbField ( "cantrecibo", BlDbField::DbNumeric, BlDbField::DbNothing, _ ( "Cantidad" ) );
        addDbField ( "idcliente", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "ID cliente" ) );
        addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "ID Forma Pago" ) );
        addDbField ( "descrecibo", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Descripcion" ) );
        addDbField ( "fecharecibo", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Fecha de creacion" ) );
        addDbField ( "pagadorecibo", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Pagado" ) );
        addDbField ( "devueltorecibo", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Devuelto" ) );

        insertWindow ( windowTitle(), this, false );

        mui_idforma_pago->setMainCompany ( comp );

        /// Establecemos los parametros de busqueda de Profesor
        mui_idcliente->setMainCompany ( comp );
        mui_idcliente->setLabel ( _ ( "Tutor/Socio:" ) );
        mui_idcliente->setTableName ( "cliente" );
	mui_idcliente->setFieldId( "idcliente" );
	mui_idcliente->m_valores["cifcliente"] = "";
        mui_idcliente->m_valores["nomcliente"] = "";
	mui_idcliente->m_valores["apellido1cliente"] = "";
	mui_idcliente->m_valores["apellido2cliente"] = "";
	mui_idcliente->setMask("[cifcliente] .- [apellido1cliente] [apellido2cliente], [nomcliente]");

        /// Activamos el listado de lineas de recibo
        mui_list->setMainCompany( comp );
        mui_list->setDbTableName ( "lrecibo" );
        mui_list->setDbFieldId ( "idlrecibo" );
        mui_list->addSubFormHeader ( "idlrecibo", BlDbField::DbInt, BlDbField::DbPrimaryKey , BlSubFormHeader::DbHideView, _ ( "Identificador" ) );
        mui_list->addSubFormHeader ( "idrecibo", BlDbField::DbInt, BlDbField::DbNothing , BlSubFormHeader::DbHideView, _ ( "ID recibo" ) );
        mui_list->addSubFormHeader ( "cantlrecibo", BlDbField::DbNumeric, BlDbField::DbNotNull, BlSubFormHeader::DbNone, _ ( "Cantidad Linea Recibo" ) );
        mui_list->addSubFormHeader ( "conceptolrecibo", BlDbField::DbVarChar, BlDbField::DbNotNull, BlSubFormHeader::DbNone, _ ( "Concepto" ) );

        mui_list->setInsert ( true );
        mui_list->setOrdenEnabled ( true );

        mui_list->load("SELECT * from lrecibo WHERE 1=2");

        pintar();
        dialogChanges_readValues();
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear el recibo" ), this );
    } // end try

    
}
/**
\param comp
\param parent
\return
**/
AlbaranProveedorView::AlbaranProveedorView ( BfCompany *comp, QWidget *parent )
        : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    try {
        setupUi ( this );
        setTitleName ( _ ( "Albaran de proveedor" ) );
        setDbTableName ( "albaranp" );
        setDbFieldId ( "idalbaranp" );
        addDbField ( "idalbaranp", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Id albaran proveedor" ) );
        addDbField ( "numalbaranp", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Numero albaran proveedor" ) );
        addDbField ( "fechaalbaranp", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Fecha albaran proveedor" ) );
        addDbField ( "comentalbaranp", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario albaran proveedor" ) );
        addDbField ( "idproveedor", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Id proveedor" ) );
        addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Id forma de pago" ) );
        addDbField ( "idalmacen", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Id almacen" ) );
        addDbField ( "procesadoalbaranp", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Albaran procesado" ) );
        addDbField ( "refalbaranp", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Referencia albaran proveedor" ) );
        addDbField ( "descalbaranp", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Descripcion albaran proveedor" ) );

        /// Disparamos los plugins.
        int res = g_plugins->run ( "AlbaranProveedorView_AlbaranProveedorView", this );
        if ( res != 0 ) {
            return;
        } // end if
        subform2->setMainCompany ( comp );
        mui_idalmacen->setMainCompany ( comp );
        mui_idforma_pago->setMainCompany ( comp );
        mui_idproveedor->setMainCompany ( comp );
        m_descuentos->setMainCompany ( comp );
        mui_refalbaranp->setMainCompany ( comp );

        /// Inicializamos BfForm.
        setListaLineas ( subform2 );
        setListaDescuentos ( m_descuentos );

        /// Establecemos los parametros de busqueda del Cliente
        mui_idproveedor->setLabel ( _ ( "Proveedor:" ) );
        mui_idproveedor->setTableName ( "proveedor" );
        mui_idproveedor->m_valores["cifproveedor"] = "";
        mui_idproveedor->m_valores["nomproveedor"] = "";

        m_totalBases->setReadOnly ( true );
        m_totalBases->setAlignment ( Qt::AlignRight );
        m_totalTaxes->setReadOnly ( true );
        m_totalTaxes->setAlignment ( Qt::AlignRight );
        m_totalDiscounts->setReadOnly ( true );
        m_totalDiscounts->setAlignment ( Qt::AlignRight );
        m_totalalbaranp->setReadOnly ( true );
        m_totalalbaranp->setAlignment ( Qt::AlignRight );
        mui_idforma_pago->setId ( "0" );
        mui_idalmacen->setId ( "0" );
        insertWindow ( windowTitle(), this, false );
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear el albaran proveedor" ), this );
    } // end try
    
}
示例#5
0
/**
\param emp
\param parent
**/
FPagoView::FPagoView ( BfCompany *emp, QWidget *parent )
        : BfForm ( emp, parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    setupUi ( this );
    groupBox1->setDisabled ( TRUE );
    setTitleName ( _ ( "Forma de Pago" ) );
    setDbTableName ( "forma_pago" );
    setEditMode();
    m_cursorFPagoView = NULL;
    m_item = NULL;

    /// Inicializamos el banco.
    mui_idbanco->setMainCompany ( emp );

    /// Disparamos los plugins.
    int res = g_plugins->run ( "FPagoView_FPagoView", this );
    if ( res != 0 ) {
        return;
    } // end if

    insertWindow ( windowTitle(), this );
    pintar();
    blScript(this);
    
}
示例#6
0
RutaComercialView::RutaComercialView ( QWidget *parent )
        : BfForm ( ((BfBulmaFact *) g_main)->company(), parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    setupUi ( this );

    setTitleName ( _ ( "Ruta comercial" ) );
    setDbTableName ( "rutacomercial" );
    setDbFieldId ( "idrutacomercial" );
    addDbField ( "idrutacomercial", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Identificador" ) );
    addDbField ( "fecharutacomercial", BlDbField::DbDate, BlDbField::DbNotNull, _ ( "Fecha" ) );
    addDbField ( "idcliente", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Familia" ) );
    addDbField ( "comentariosrutacomercial", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentarios" ) );
    addDbField ( "horarutacomercial", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Hora" ) );
    addDbField ( "refrutacomercial",  BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Referencia" ) );

    
    /// Establecemos los parametros de busqueda del Cliente
    mui_idcliente->setMainCompany ( ((BfBulmaFact *) g_main)->company() );
    mui_idcliente->setLabel ( _ ( "Cliente:" ) );
    mui_idcliente->setTableName ( "cliente" );
    mui_idcliente->m_valores["cifcliente"] = "";
    mui_idcliente->m_valores["nomcliente"] = "";

    pintar();
    dialogChanges_readValues();
    blScript(this);
    
}
/**
\param emp
\param parent
**/
BcAsientoInteligenteView::BcAsientoInteligenteView ( BcCompany *emp, QWidget *parent )
        : BcForm ( emp, parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    setupUi ( this );

    setTitleName ( _ ( "Asiento" ) );
    /// Establezco cual es la tabla en la que basarse para los permisos
    setDbTableName ( "asiento" );

    /// iniciamos los contadores de variables para que no haya problemas.
    indvariablescta = 0;
    indvariablesfecha = 0;
    indvariablesnumero = 0;
    indvariablestexto = 0;
    /// Este array es estático, pero como no se modifica nunca se ponen los
    /// valores al principio y la parte dinámica queda igual.
    indvariablespredefinidas = 0;
    /// Cada apunte la tiene o no la tiene, pero no se debe aplicar.
    indvariablesapunte = 1;
    variablesapunte[VAR_APUNT_CIFCUENTA][0] = "$cifcuenta$";
    mainCompany() ->insertWindow ( windowTitle(), this );
    setModo ( 0 );
    g_asiento->mui_inteligente->setDisabled ( TRUE );
    /// Llamamos a los scripts
    blScript(this);
    
}
示例#8
0
/**
\param comp
\param parent
**/
PagoView::PagoView ( BfCompany *comp, QWidget *parent )
        :  BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    try {
        setAttribute ( Qt::WA_DeleteOnClose );
        setupUi ( this );
        blCenterOnScreen ( this );
        /// Usurpamos la identidad de mlist y ponemos nuestro propio widget con sus cosillas.
        mui_idproveedor->setMainCompany ( comp );
        mui_refpago->setMainCompany ( comp );
        mui_idbanco->setMainCompany ( comp );

        setTitleName ( _ ( "Pago" ) );
        setDbTableName ( "pago" );
        setDbFieldId ( "idpago" );
        addDbField ( "idpago", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Id pago" ) );
        addDbField ( "idproveedor", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Id proveedor" ) );
        addDbField ( "previsionpago", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Previcion de pago" ) );
        addDbField ( "fechapago", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Fecha de pago" ) );
        addDbField ( "refpago", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Referencia de pago" ) );
        addDbField ( "cantpago", BlDbField::DbNumeric, BlDbField::DbNotNull, _ ( "Cantidad" ) );
        addDbField ( "comentpago", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario del pago" ) );
        addDbField ( "idbanco", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Banco" ) );
        addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Forma de pago" ) );
	
        /// Disparamos los plugins.
        int res = g_plugins->run ( "PagoView_PagoView", this );
        if ( res != 0 ) {
            return;
        } // end if
	
        /// Establecemos los parametros de busqueda del Cliente
        mui_idproveedor->setLabel ( _ ( "Proveedor:" ) );
        mui_idproveedor->setTableName ( "proveedor" );
        mui_idproveedor->m_valores["cifproveedor"] = "";
        mui_idproveedor->m_valores["nomproveedor"] = "";

	mui_idforma_pago->setMainCompany( comp );
        mui_idforma_pago->setQuery ( "SELECT * FROM forma_pago ORDER BY descforma_pago" );
        mui_idforma_pago->setTableName ( "forma_pago" );
        mui_idforma_pago->setFieldId ( "idforma_pago" );
        mui_idforma_pago->m_valores["descforma_pago"] = "";
        mui_idforma_pago->setAllowNull ( false );
        mui_idforma_pago->setId ( "" );
	
	
        insertWindow ( windowTitle(), this, false );
        pintar();
        dialogChanges_readValues();
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear el pago" ), this );
    } // end try

    
}
示例#9
0
/**
\param emp
\param parent
**/
BalanceView::BalanceView ( BcCompany *emp, QWidget *parent, int )
    : BcForm ( emp, parent )
{
    BL_FUNC_DEBUG
    setupUi ( this );

    setAttribute(Qt::WA_DeleteOnClose);
    setTitleName ( _ ( "Balance" ) );
    /// Establezco cual es la tabla en la que basarse para el sistema de permisos.
    setDbTableName ( "asiento" );

    /// Para imprimir usaremos la plantilla balance
    setTemplateName("balance");

    mui_cuentaInicial->setMainCompany ( emp );
    /// Arreglamos la cuenta.
    mui_cuentaInicial->setLabel ( _ ( "Cuenta inicial:" ) );
    mui_cuentaInicial->setTableName ( "cuenta" );
    mui_cuentaInicial->setFieldId("idcuenta");
    mui_cuentaInicial->m_valores["descripcion"] = "";
    mui_cuentaInicial->m_valores["codigo"] = "";
    mui_cuentaInicial->hideLabel();

    mui_cuentaFinal->setMainCompany ( emp );
    /// Arreglamos la cuenta.
    mui_cuentaFinal->setLabel ( _ ( "Cuenta final:" ) );
    mui_cuentaFinal->setTableName ( "cuenta" );
    mui_cuentaFinal->setFieldId("idcuenta");
    mui_cuentaFinal->m_valores["descripcion"] = "";
    mui_cuentaFinal->m_valores["codigo"] = "";
    mui_cuentaFinal->hideLabel();

    QString query = "SELECT DISTINCT length(codigo) AS orden FROM cuenta ORDER BY orden DESC";
    BlDbRecordSet *niveles = NULL;
    /// Primero, averiguaremos la cantidad de ramas iniciales que nacen de la raíz
    /// (tantas como número de cuentas de nivel 2) y las vamos creando.
    niveles = mainCompany() ->loadQuery ( query );

    while ( !niveles->eof() ) {
        mui_nivel->insertItem ( 0, niveles->value("orden") );
        niveles->nextRecord();
    } // end while
    delete niveles;

    /// Iniciamos los componentes de la fecha para que al principio aparezcan
    /// como el año inicial.
    QString cadena;
    cadena.sprintf ( "%2.2d/%2.2d/%4.4d", 1, 1, QDate::currentDate().year() );
    mui_fechaInicial->setText ( cadena );
    cadena.sprintf ( "%2.2d/%2.2d/%4.4d", 31, 12, QDate::currentDate().year() );
    mui_fechaFinal->setText ( cadena );

    mainCompany() ->insertWindow ( windowTitle(), this );
    /// Llamamos a los scripts
    blScript(this);
}
示例#10
0
/**
\param comp
\param parent
**/
ZView::ZView ( BfCompany *comp, QWidget *parent )
        : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    try {
        setupUi ( this );

        /// Lanzamos los plugins.
        if ( g_plugins->run ( "ZView_ZView", this ) ) return;

        setTitleName ( _ ( "Cuadre de caja" ) );
        setDbTableName ( "z" );
        setDbFieldId ( "idz" );
        addDbField ( "idz", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Id" ) );
        addDbField ( "fechaz", BlDbField::DbDate, BlDbField::DbNotNull, _ ( "Fecha" ) );
        addDbField ( "horaz", BlDbField::DbVarChar, BlDbField::DbNotNull, _ ( "Hora" ) );
        addDbField ( "totalz", BlDbField::DbNumeric, BlDbField::DbNotNull, _ ( "Total" ) );
        addDbField ( "numtickets", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Num. tickets" ) );
        addDbField ( "idalmacen", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Id. almacen" ) );
        addDbField ( "nomalmacen", BlDbField::DbVarChar, BlDbField::DbNoSave, _ ( "Almacen" ) );

        mui_idalmacen->setMainCompany ( comp );


        mui_list->setMainCompany ( comp );
        mui_list->setDbTableName ( "albaran" );
        mui_list->setDbFieldId ( "idalbaran" );
        mui_list->addSubFormHeader ( "idalbaran",  BlDbField::DbInt, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Id albaran" ) );
        mui_list->addSubFormHeader ( "numalbaran",  BlDbField::DbVarChar, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Numero" ) );
        mui_list->addSubFormHeader ( "descalbaran",  BlDbField::DbVarChar, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Descripcion" ) );
        mui_list->addSubFormHeader ( "refalbaran",  BlDbField::DbVarChar, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Referencia" ) );
        mui_list->addSubFormHeader ( "fechaalbaran",  BlDbField::DbDate, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Fecha" ) );
        mui_list->addSubFormHeader ( "procesadoalbaran",  BlDbField::DbBoolean, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Procesado" ) );
        mui_list->addSubFormHeader ( "idforma_pago",  BlDbField::DbInt, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Id forma de pago" ) );
        mui_list->addSubFormHeader ( "descforma_pago",  BlDbField::DbVarChar, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite,  _ ( "Forma de pago" ) );
        mui_list->addSubFormHeader ( "anuladoalbaran",  BlDbField::DbBoolean, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Anulado" ) );
        mui_list->addSubFormHeader ( "horaalbaran",  BlDbField::DbVarChar, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Hora" ) );
        mui_list->addSubFormHeader ( "totalalbaran",  BlDbField::DbNumeric, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Total" ) );
        mui_list->addSubFormHeader ( "bimpalbaran",  BlDbField::DbNumeric, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Base Imponible" ) );
        mui_list->addSubFormHeader ( "impalbaran",  BlDbField::DbNumeric, BlDbField::DbNoSave, BlSubFormHeader::DbNoWrite, _ ( "Impuestos" ) );

        mui_list->setInsert ( false );
        mui_list->setDelete ( false );
        mui_list->setSortingEnabled ( true );

        dialogChanges_readValues();
        insertWindow ( windowTitle(), this, false );
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear el almacen" ) );
    } // end try
    
}
示例#11
0
void RepayView::onEnter(){
    UIComponent::getInstance()->showPopupView(8);
    setTitleName(_lang("133246")); 
    CCSafeNotificationCenter::sharedNotificationCenter()->addObserver(this, callfuncO_selector(RepayView::refreshData), MSG_REPAY_INFO_INIT, NULL);
    CCSafeNotificationCenter::sharedNotificationCenter()->addObserver(this, callfuncO_selector(RepayView::showDes), MSG_REPAY_VIEW_SHOW_DES, NULL);
    setTouchMode(Touch::DispatchMode::ONE_BY_ONE);
    setTouchEnabled(true);

    //CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, Touch_Default, true);
    PopupBaseView::onEnter();
}
示例#12
0
void EquipLongjingView::onEnter(){
    CCNode::onEnter();
    CCSafeNotificationCenter::sharedNotificationCenter()->addObserver(this, callfuncO_selector(EquipLongjingView::onRetSellEquip), EQUIP_BAG_SHOW_DES, NULL);
    CCSafeNotificationCenter::sharedNotificationCenter()->addObserver(this, callfuncO_selector(EquipLongjingView::onRetBuyEquip), MSG_BUY_CONFIRM_OK, NULL);
    
    m_isInitEnd = false;
    
//    UIComponent::getInstance()->showEquipOrBagBtn(1);
    
    setTouchMode(Touch::DispatchMode::ONE_BY_ONE);
    setTouchEnabled(true);
    
    setTitleName(_lang("111652"));
    onRefreshData(1);
}
示例#13
0
/**
\param comp
\param parent
**/
VencimientoCView::VencimientoCView ( BfCompany *comp, QWidget *parent )
        :  BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    try {
        setAttribute ( Qt::WA_DeleteOnClose );
        setupUi ( this );
        blCenterOnScreen ( this );

        /// Usurpamos la identidad de mlist y ponemos nuestro propio widget con sus cosillas.
        mui_refvencimientoc->setMainCompany ( comp );


        /// Establecemos los parametros de busqueda del Cliente
        mui_idcliente->setMainCompany ( comp );
        mui_idcliente->setLabel ( _ ( "Cliente:" ) );
        mui_idcliente->setTableName ( "cliente" );
        mui_idcliente->m_valores["cifcliente"] = "";
        mui_idcliente->m_valores["nomcliente"] = "";
 
        setTitleName ( tr ( "Vencimiento" ) );
        setDbTableName ( "vencimientoc" );
        setDbFieldId ( "idvencimientoc" );
        addDbField ( "idvencimientoc", BlDbField::DbInt, BlDbField::DbPrimaryKey, QApplication::translate ( "Cobro", "Id cobro" ) );
        addDbField ( "refvencimientoc", BlDbField::DbVarChar, BlDbField::DbNothing, QApplication::translate ( "Cobro", "Referencia de vencimiento" ) );
        addDbField ( "descvencimientoc", BlDbField::DbVarChar, BlDbField::DbNothing, QApplication::translate ( "Cobro", "Descripcion" ) );
        addDbField ( "comentvencimientoc", BlDbField::DbVarChar, BlDbField::DbNothing, QApplication::translate ( "Cobro", "Comentarios" ) );
        addDbField ( "fechavencimientoc", BlDbField::DbVarChar, BlDbField::DbNothing, QApplication::translate ( "Cobro", "Fecha de vencimiento" ) );
        addDbField ( "fechaefvencimientoc", BlDbField::DbVarChar, BlDbField::DbNothing, QApplication::translate ( "Cobro", "Fecha efectiva" ) );
        addDbField ( "estadovencimientoc", BlDbField::DbVarChar, BlDbField::DbNothing, QApplication::translate ( "Vencimiento", "Estado de vencimiento" ) );
        addDbField ( "cantvencimientoc", BlDbField::DbNumeric, BlDbField::DbNothing, QApplication::translate ( "Vencimiento", "Cantidad de vencimiento" ) );
        addDbField ( "idcliente", BlDbField::DbInt, BlDbField::DbNothing, QApplication::translate ( "Vencimiento", "idcliente de Vencimiento" ) );
        insertWindow ( windowTitle(), this, false );
        pintar();
        dialogChanges_readValues();
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( tr ( "Error al crear el pago" ), this );
    } // end try
    
}
示例#14
0
void PlayerRankListView::onEnter()
{
    CCNode::onEnter();
    CCSafeNotificationCenter::sharedNotificationCenter()->addObserver(this, callfuncO_selector(PlayerRankListView::refreashData), PLAYER_RANK, NULL);
    string name ="";
    string title2 = "";
    if(m_type==1){
        name =_lang("108101")+" "+ _lang("108103");
        title2 = _lang("102163");
    }else if(m_type==2){
        name =_lang("108101")+" "+ _lang("108108");
        title2 = _lang("108109");
    }else if(m_type==3){
        name =_lang("108101")+" "+ _lang("108110");
        title2 = _lang("108634");
    }else if(m_type==4){
        name =_lang("108101")+" "+ _lang("108112");
        title2 = _lang("108634");
    }
     m_textTitle2->setString(title2);
    setTitleName(name.c_str());
}
/**
\param emp
\param parent
\param flag
\param editmode
**/
BcPlanContableListView::BcPlanContableListView ( BcCompany *emp, QWidget *parent, Qt::WFlags flag, edmode editmode )
        : BcForm ( emp, parent, flag ), BlImportExport ( emp )
{
    BL_FUNC_DEBUG
    setupUi ( this );

    setAttribute(Qt::WA_DeleteOnClose);
    setTitleName ( _ ( "Cuenta" ) );
    /// Establezco cual es la tabla en la que basarse para el sistema de permisos
    setDbTableName ( "cuenta" );

    m_modo = editmode;
    /// Para el listado de columnas hacemos una inicialización.
    QStringList headers;
    headers << _ ( "Codigo cuenta" ) << _ ( "Nombre cuenta" ) << _ ( "Debe" ) << _ ( "Haber" ) << _ ( "ID cuenta" ) << _ ( "Bloqueada" ) << _ ( "Nodebe" ) << _ ( "Nohaber" ) << _ ( "Regularizacion" ) << _ ( "Imputacion" ) << _ ( "Grupo" ) << _ ( "Tipo cuenta" );
    mui_arbolcuentas->setHeaderLabels ( headers );
    ccuenta = 0;
    cdesccuenta = 1;
    cdebe = 2;
    chaber = 3;
    cidcuenta = 4;
    cbloqueada = 5;
    cnodebe = 6;
    cnohaber = 7;
    cregularizacion = 8;
    cimputacion = 9;
    cgrupo = 10;
    ctipocuenta = 11;

    mui_arbolcuentas->setColumnWidth ( ccuenta, 175 );
    mui_arbolcuentas->setColumnWidth ( cdesccuenta, 400 );
    mui_arbolcuentas->hideColumn ( cidcuenta );
    mui_arbolcuentas->hideColumn ( cnodebe );
    mui_arbolcuentas->hideColumn ( cnohaber );
    mui_arbolcuentas->hideColumn ( cregularizacion );
    mui_arbolcuentas->hideColumn ( cimputacion );
    mui_arbolcuentas->hideColumn ( cgrupo );
    mui_arbolcuentas->hideColumn ( ctipocuenta );



    mui_tablacuentas->setColumnCount ( 3 );
    headers << _ ( "CODIGO" ) << _ ( "NOMBRE" );
    mui_tablacuentas->setHorizontalHeaderLabels ( headers );

    mui_tablacuentas->hideColumn ( 2 );
    mui_tablacuentas->setColumnWidth ( 1, 400 );
    mui_tablacuentas->setColumnWidth ( 0, 100 );

    installEventFilter ( this );
    if ( m_modo == BL_EDIT_MODE )
        mainCompany() ->insertWindow ( windowTitle(), this );

    /// De forma predeterminada los botones de busqueda 'anterior' y 'siguiente' estan deshabilitados.
    mui_anterior->setDisabled(true);
    mui_siguiente->setDisabled(true);
    /// Llamamos a los scripts
    blScript(this);

    
}
示例#16
0
/** inicializa todos los componentes de la clase.
    Resetea el sistema de control de cambios para que considere que no hay cambios por parte del usuario.
    Mete la ventana en el workSpace.
*/
ConvReunionView::ConvReunionView ( BfCompany *comp, QWidget *parent ) : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    
    setAttribute ( Qt::WA_DeleteOnClose );
    
    try {
    
        setupUi ( this );
        blCenterOnScreen ( this );

        setTitleName ( _ ( "Convocatoria de reunion" ) );
        setDbTableName ( "reunion" );
        setDbFieldId ( "idreunion" );
        addDbField ( "idreunion", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "ID reunion" ) );
        addDbField ( "fecha1convocatoriareunion", BlDbField::DbDate, BlDbField::DbNotNull, _ ( "Fecha 1a Convocatoria" ) );
        addDbField ( "fecha2convocatoriareunion", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Fecha 2a Convocatoria" ) );
        addDbField ( "hora1convocatoriareunion", BlDbField::DbVarChar, BlDbField::DbNotNull, _ ( "Hora 1a Convocatoria" ) );
        addDbField ( "hora2convocatoriareunion", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Hora 2a Convocatoria" ) );
        addDbField ( "tiporeunion", BlDbField::DbVarChar, BlDbField::DbNotNull, _ ( "Tipo" ) );
        addDbField ( "conceptoreunion", BlDbField::DbVarChar, BlDbField::DbNotNull, _ ( "Concepto" ) );
        addDbField ( "resolucionreunion", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Resolucion" ) );

        mui_list->setMainCompany( comp );
        mui_list->setDbTableName ( "asistentereunion" );
        mui_list->setDbFieldId ( "idasistentereunion" );
        mui_list->addSubFormHeader ( "idasistentereunion", BlDbField::DbInt, BlDbField::DbPrimaryKey, BlSubFormHeader::DbHideView | BlSubFormHeader::DbNoWrite, _ ( "ID asistentereunion" ) );
        mui_list->addSubFormHeader ( "idreunion", BlDbField::DbInt, BlDbField::DbNothing, BlSubFormHeader::DbHideView | BlSubFormHeader::DbNoWrite, _ ( "ID Reunion" ) );
        mui_list->addSubFormHeader ( "idcliente", BlDbField::DbInt, BlDbField::DbNotNull | BlDbField::DbRequired, BlSubFormHeader::DbHideView | BlSubFormHeader::DbNoWrite, _ ( "ID Socio" ) );
        mui_list->addSubFormHeader ( "nomcliente", BlDbField::DbVarChar, BlDbField::DbNoSave, BlSubFormHeader::DbNone, _ ( "Nombre Socio" ) );

        mui_list->setInsert ( TRUE );
        mui_list->setDelete ( TRUE );
        mui_list->setSortingEnabled ( FALSE );

	 /// Hacemos una carga vacia para que se inicie bien el subformulario
         mui_list->load("SELECT * from asistentereunion NATURAL LEFT JOIN cliente WHERE 1 = 2");

        mui_ordendia->setMainCompany( comp );
        mui_ordendia->setDbTableName ( "ordendiareunion" );
        mui_ordendia->setDbFieldId ( "idordendiareunion" );
        mui_ordendia->addSubFormHeader ( "idordendiareunion", BlDbField::DbInt, BlDbField::DbPrimaryKey, BlSubFormHeader::DbHideView | BlSubFormHeader::DbNoWrite, _ ( "ID Orden del dia" ) );
        mui_ordendia->addSubFormHeader ( "idreunion", BlDbField::DbInt, BlDbField::DbNothing, BlSubFormHeader::DbHideView | BlSubFormHeader::DbNoWrite, _ ( "ID Reunion" ) );
        mui_ordendia->addSubFormHeader ( "conceptoordendiareunion", BlDbField::DbVarChar, BlDbField::DbRequired, BlSubFormHeader::DbNone, _ ( "Concepto" ) );
        mui_ordendia->addSubFormHeader ( "textoordendiareunion", BlDbField::DbVarChar, BlDbField::DbNothing, BlSubFormHeader::DbNone, _ ( "Texto" ) );
        mui_ordendia->addSubFormHeader ( "resolucionordendiareunion", BlDbField::DbVarChar, BlDbField::DbNothing, BlSubFormHeader::DbNone, _ ( "Resolucion" ) );

        mui_ordendia->setInsert ( TRUE );
        mui_ordendia->setDelete ( TRUE );
        mui_ordendia->setSortingEnabled ( FALSE );
        
	 /// Hacemos una carga vacia para que se inicie bien el subformulario
         mui_ordendia->load("SELECT * from ordendiareunion WHERE 1 = 2");

        insertWindow ( windowTitle(), this, FALSE );
        pintar();
        dialogChanges_readValues();
        blScript(this);
    } catch ( ... ) {
    
        blMsgInfo ( _ ( "Error al crear la reunion" ), this );
        
    } // end try
    
    
}
示例#17
0
void ActivityView::onEnter()
{
    CCNode::onEnter();
    setTitleName("");
}
示例#18
0
/**
\param comp
\param parent
**/
PedidoProveedorView::PedidoProveedorView ( BfCompany *comp, QWidget *parent )
        : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    try {
        setupUi ( this );

        setTitleName ( _ ( "Pedido Proveedor" ) );
        setDbTableName ( "pedidoproveedor" );
        setDbFieldId ( "idpedidoproveedor" );
        addDbField ( "idpedidoproveedor", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Id pedido proveedor" ) );
        addDbField ( "idproveedor", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Id proveedor" ) );
        addDbField ( "idalmacen", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Id almacen" ) );
        addDbField ( "numpedidoproveedor", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Numero pedido proveedor" ) );
        addDbField ( "fechapedidoproveedor", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Fecha pedido proveedor" ) );
        addDbField ( "comentpedidoproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario pedido" ) );
        addDbField ( "procesadopedidoproveedor", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Pedido procesado" ) );
        addDbField ( "descpedidoproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Descripcion pedido" ) );
        addDbField ( "refpedidoproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Referencia pedido" ) );
        addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Id forma de pago" ) );
        addDbField ( "idtrabajador", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Id trabajador" ) );
        addDbField ( "contactpedidoproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Persona de contacto proveedor" ) );
        addDbField ( "telpedidoproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Telefono proveedor" ) );

        /// Disparamos los plugins.
        int res = g_plugins->run ( "PedidoProveedorView_PedidoProveedorView", this );
        if ( res != 0 ) {
            return;
        } // end if

        /// Usurpamos la identidad de mlist y ponemos nuestro propio widget con sus cosillas.
        mui_lineasDetalle->setMainCompany ( comp );
        mui_lineasDetalle->inicializar();
        mui_idproveedor->setMainCompany ( comp );
        mui_idforma_pago->setMainCompany ( comp );
        mui_idforma_pago->setId ( "0" );
        mui_descuentos->setMainCompany ( comp );
        mui_descuentos->inicializar();
        mui_idalmacen->setMainCompany ( comp );
        mui_idalmacen->setId ( "0" );
        mui_idtrabajador->setMainCompany ( comp );
        mui_idtrabajador->setId ( "0" );
        mui_refpedidoproveedor->setMainCompany ( comp );

        /// Establecemos los parametros de busqueda del Cliente
        mui_idproveedor->setLabel ( _ ( "Proveedor:" ) );
        mui_idproveedor->setTableName ( "proveedor" );
        mui_idproveedor->m_valores["cifproveedor"] = "";
        mui_idproveedor->m_valores["nomproveedor"] = "";

        setListaLineas ( mui_lineasDetalle );
        setListaDescuentos ( mui_descuentos );

        dialogChanges_readValues();
        insertWindow ( windowTitle(), this, FALSE );
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear el pedido a proveedor" ), this );
    } // end try
    
}
示例#19
0
/**
\param comp
\param parent
\return
**/
TicketClienteView::TicketClienteView ( BfCompany *comp, QWidget *parent )
        : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    try {
        setupUi ( this );

        setTitleName ( _ ( "Ticket" ) );
        setDbTableName ( "albaran" );
        setDbFieldId ( "idalbaran" );
        addDbField ( "idalbaran", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Id albaran" ) );
        addDbField ( "idcliente", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Cliente" ) );
        addDbField ( "idalmacen", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Almacen" ) );
        addDbField ( "numalbaran", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Numero de albaran" ) );
        addDbField ( "fechaalbaran", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Fecha de creacion" ) );
        addDbField ( "contactalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Persona de contacto" ) );
        addDbField ( "telalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Telefono de contacto" ) );
        addDbField ( "comentalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario" ) );
        addDbField ( "comentprivalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario privado" ) );
        addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Forma de pago" ) );
        addDbField ( "idtrabajador", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Trabajador" ) );
        addDbField ( "procesadoalbaran", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Procesado" ) );
        addDbField ( "descalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Descripcion" ) );
        addDbField ( "refalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Referencia" ) );
        addDbField ( "cambiosalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Sucesos antes de imprimir" ) );
        addDbField ( "cambiospostalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Sucesos tras imprimir" ) );

        /// Disparamos los plugins.
        int res = g_plugins->run ( "TicketClienteView_TicketClienteView", this );
        if ( res != 0 )
            return;

        subform2->setMainCompany ( comp );
        m_descuentos->setMainCompany ( comp );
        mui_idalmacen->setMainCompany ( comp );
        mui_idforma_pago->setMainCompany ( comp );
        mui_idcliente->setMainCompany ( comp );
        mui_idtrabajador->setMainCompany ( comp );
        mui_refalbaran->setMainCompany ( comp );

        setListaLineas ( subform2 );
        setListaDescuentos ( m_descuentos );


        /// Establecemos los parametros de busqueda del Cliente
        mui_idcliente->setLabel ( _ ( "Cliente:" ) );
        mui_idcliente->setTableName ( "cliente" );
        mui_idcliente->m_valores["cifcliente"] = "";
        mui_idcliente->m_valores["nomcliente"] = "";

        /// Inicializamos para que no se queden sin ser pintada.
        mui_idforma_pago->setFieldValue ( "0" );
        mui_idalmacen->setFieldValue ( "0" );
        mui_idtrabajador->setFieldValue ( "0" );

        insertWindow ( windowTitle(), this, FALSE );
        /// Disparamos los plugins por flanco descendente.
        g_plugins->run ( "TicketClienteView_TicketClienteView_Post", this );
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear el albaran a cliente" ), this );
    } // end try
    
}
示例#20
0
/**
\param comp
\param parent
\return
**/
AlbaranClienteView::AlbaranClienteView ( BfCompany *comp, QWidget *parent )
        : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    setAttribute ( Qt::WA_DeleteOnClose );
    try {
        setupUi ( this );

        setTitleName ( _ ( "Albaran" ) );
        setDbTableName ( "albaran" );
        setDbFieldId ( "idalbaran" );
        addDbField ( "idalbaran", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Id albaran" ) );
        addDbField ( "idcliente", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Cliente" ) );
        addDbField ( "idalmacen", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Almacen" ) );
        addDbField ( "numalbaran", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Numero de albaran" ) );
        addDbField ( "fechaalbaran", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Fecha de creacion" ) );
        addDbField ( "contactalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Persona de contacto" ) );
        addDbField ( "telalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Telefono de contacto" ) );
        addDbField ( "comentalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario" ) );
        addDbField ( "comentprivalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario privado" ) );
        addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Forma de pago" ) );
        addDbField ( "idtrabajador", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Trabajador" ) );
        addDbField ( "procesadoalbaran", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Procesado" ) );
        addDbField ( "descalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Descripcion" ) );
        addDbField ( "refalbaran", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Referencia" ) );
        addDbField ( "irpfalbaran", BlDbField::DbNumeric, BlDbField::DbNothing, _ ( "IRPF" ) );
        /// Disparamos los plugins.
        int res = g_plugins->run ( "AlbaranClienteView_AlbaranClienteView", this );
        if ( res != 0 )
            return;

        subform2->setMainCompany ( comp );
        m_descuentos->setMainCompany ( comp );
        mui_idalmacen->setMainCompany ( comp );
        mui_idforma_pago->setMainCompany ( comp );
        mui_idcliente->setMainCompany ( comp );
        mui_idtrabajador->setMainCompany ( comp );
        mui_refalbaran->setMainCompany ( comp );

        setListaLineas ( subform2 );
        setListaDescuentos ( m_descuentos );


        /// Establecemos los parametros de busqueda del Cliente
        mui_idcliente->setLabel ( _ ( "Cliente:" ) );
        mui_idcliente->setTableName ( "cliente" );
        mui_idcliente->m_valores["cifcliente"] = "";
        mui_idcliente->m_valores["nomcliente"] = "";

        /// Inicializamos para que no se queden sin ser pintada.
        mui_idforma_pago->setFieldValue ( "0" );
        mui_idalmacen->setFieldValue ( "0" );
        mui_idtrabajador->setFieldValue ( "0" );

	/// Calculamos el IRPF y lo ponemos
        QString query = "SELECT tasairpf FROM irpf WHERE fechairpf <= now()::DATE ORDER BY fechairpf DESC LIMIT 1";
	BlDbRecordSet *cur = mainCompany() ->loadQuery ( query);
	if ( cur ) {
	    if ( !cur->eof() ) {
		mui_irpfalbaran -> setText( cur->value( "tasairpf" ) );
		setDbValue("irpfalbaran", cur->value("tasairpf") );
	    } // end if
	    delete cur;
	} // end if
	
        insertWindow ( windowTitle(), this, false );
        /// Disparamos los plugins por flanco descendente.
        g_plugins->run ( "AlbaranClienteView_AlbaranClienteView_Post", this );
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear el albaran a cliente" ), this );
    } // end try
    
}
示例#21
0
void LanguageSettingView::onEnter(){
    PopupBaseView::onEnter();
    setTitleName(_lang("102910"));
}
示例#22
0
/**
\param comp
\param parent
**/
FacturaView::FacturaView ( BfCompany *comp, QWidget *parent )
        : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    setupUi ( this );
    setAttribute ( Qt::WA_DeleteOnClose );
    try {
        setTitleName ( _ ( "Factura" ) );
        setDbTableName ( "factura" );
        setDbFieldId ( "idfactura" );
        addDbField ( "idfactura", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "Id factura" ) );
        addDbField ( "idcliente", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Cliente" ) );
        addDbField ( "idalmacen", BlDbField::DbInt, BlDbField::DbNotNull, _ ( "Almacen" ) );
        addDbField ( "numfactura", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Numero factura" ) );
        addDbField ( "ffactura", BlDbField::DbDate, BlDbField::DbNothing, _ ( "Ffactura" ) );
        addDbField ( "procesadafactura", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Procesada factura" ) );
        addDbField ( "codigoserie_factura", BlDbField::DbVarChar, BlDbField::DbNotNull, _ ( "Serie" ) );
        addDbField ( "comentfactura", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentario" ) );
        addDbField ( "reffactura", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Referencia" ) );
        addDbField ( "descfactura", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Descripcion" ) );
        addDbField ( "idtrabajador", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Trabajador" ) );
        addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Forma de pago" ) );

        /// Establecemos algunos Buddies.
        mui_labelAlmacen->setText ( _ ( "Al&macen" ) );
        mui_labelAlmacen->setBuddy ( mui_idalmacen );

        /// Disparamos los plugins.
        int res = g_plugins->run ( "FacturaView_FacturaView", this );
        if ( res != 0 ) {
            return;
        } // end if
        subform2->setMainCompany ( comp );
        mui_idalmacen->setMainCompany ( comp );
        mui_idforma_pago->setMainCompany ( comp );
        mui_idcliente->setMainCompany ( comp );
        m_descuentos->setMainCompany ( comp );
        mui_codigoserie_factura->setMainCompany ( comp );
        mui_reffactura->setMainCompany ( comp );
        mui_idtrabajador->setMainCompany ( comp );
      
        /// Inicializamos BfForm.
        setListaLineas ( subform2 );
        setListaDescuentos ( m_descuentos );

        /// Establecemos los parametros de busqueda del Cliente
        mui_idcliente->setLabel ( _ ( "Cliente:" ) );
        mui_idcliente->setTableName ( "cliente" );
        mui_idcliente->m_valores["cifcliente"] = "";
        mui_idcliente->m_valores["nomcliente"] = "";

        /// Establecemos valores por defecto en los combo boxes para que no se queden sin inicializar.
        mui_idalmacen->setId ( "" );
        mui_codigoserie_factura->setId ( "" );
        mui_idforma_pago->setId ( "" );
        mui_idtrabajador->setId ( "0" );

        m_totalBases->setReadOnly ( true );
        m_totalBases->setAlignment ( Qt::AlignRight );
        m_totalTaxes->setReadOnly ( true );
        m_totalTaxes->setAlignment ( Qt::AlignRight );
        m_totalDiscounts->setReadOnly ( true );
        m_totalDiscounts->setAlignment ( Qt::AlignRight );
        m_totalfactura->setReadOnly ( true );
        m_totalfactura->setAlignment ( Qt::AlignRight );
        insertWindow ( windowTitle(), this, false );
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _ ( "Error al crear la factura" ), this );
    }
    
}
示例#23
0
/**
\param comp
\param parent
**/
ProveedorView::ProveedorView ( BfCompany *comp, QWidget *parent )
        : BfForm ( comp, parent )
{
    BL_FUNC_DEBUG
    setupUi ( this );
    setAttribute ( Qt::WA_DeleteOnClose );
    try {
        setTitleName ( _ ( "Proveedor" ) );
        setDbTableName ( "proveedor" );
        setDbFieldId ( "idproveedor" );
        addDbField ( "idproveedor", BlDbField::DbInt, BlDbField::DbPrimaryKey, _ ( "ID proveedor" ) );
        addDbField ( "nomproveedor", BlDbField::DbVarChar, BlDbField::DbNotNull, _ ( "Nombre del proveedor" ) );
        addDbField ( "nomaltproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Nombre alternativo del proveedor" ) );
        addDbField ( "cifproveedor", BlDbField::DbVarChar, BlDbField::DbNotNull, _ ( "C.I.F. del proveedor" ) );
        addDbField ( "codicliproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Codigo cliente" ) );
        addDbField ( "cbancproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Banco proveedor" ) );
        addDbField ( "dirproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Direccion" ) );
        addDbField ( "poblproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Poblacion" ) );
        addDbField ( "idprovincia", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Provincia" ) );
        addDbField ( "cpproveedor", BlDbField::DbVarChar, BlDbField::DbNotNull, _ ( "Codigo postal" ) );
        addDbField ( "telproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Numero de telefono" ) );
        addDbField ( "faxproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Numero de fax" ) );
        addDbField ( "emailproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Direccion electronica" ) );
        addDbField ( "urlproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "URL" ) );
        addDbField ( "comentproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Comentarios" ) );
        addDbField ( "clavewebproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Datos de comercio electronico" ) );
        addDbField ( "codproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Codigo" ) );
        addDbField ( "regimenfiscalproveedor", BlDbField::DbVarChar, BlDbField::DbNothing, _ ( "Regimen Fiscal" ) );
        addDbField ( "idforma_pago", BlDbField::DbInt, BlDbField::DbNothing, _ ( "Forma_Pago" ) );
        addDbField ( "recargoeqproveedor", BlDbField::DbBoolean, BlDbField::DbNothing, _ ( "Recargo de Equivalencia" ) );
        addDbField ( "irpfproveedor", BlDbField::DbNumeric, BlDbField::DbNothing, _ ( "IRPF" ) );



        /// Disparamos los plugins.
        int res = g_plugins->run ( "ProveedorView_ProveedorView", this );
        if ( res != 0 ) {
            return;
        } // end if
	
        /// Deshabilitamos los tabs que aun no se usan.
	int i;
	
	for (i = 0; i < mui_tab->count(); i++) {
	
	    if (mui_tab->widget(i)->objectName() == "tabDivisiones") {
		mui_tab->setTabEnabled(i, false);
	    } else if (mui_tab->widget(i)->objectName() == "tabProductosSuministrados") {
		mui_tab->setTabEnabled(i, false);    
	    } else if (mui_tab->widget(i)->objectName() == "tabContratos") {
		mui_tab->setTabEnabled(i, false);
	    } // end if
	    	    
	} // end for
	

        /// Cargamos algunos valores por defecto.
        mui_idforma_pago->setMainCompany ( mainCompany() );
        mui_idforma_pago->setId ( "0" );

        mui_idprovincia->setMainCompany ( mainCompany() );
        mui_idprovincia->setQuery ( "SELECT * FROM provincia LEFT JOIN pais ON provincia.idpais = pais.idpais ORDER BY descpais, provincia" );
        mui_idprovincia->setTableName ( "provincia" );
        mui_idprovincia->setFieldId ( "idprovincia" );
        mui_idprovincia->m_valores["provincia"] = "";
        mui_idprovincia->m_valores["descpais"] = "";
        mui_idprovincia->setId ( "" );


        insertWindow ( windowTitle(), this, false );
        dialogChanges_readValues();

        /// Disparamos los plugins.
        g_plugins->run ( "ProveedorView_ProveedorView_Post", this );
	blScript(this);
    } catch ( ... ) {
        blMsgInfo ( _( "Error al crear el proveedor" ) );
    } // end try

    
}
示例#24
0
bool RepayView::init(){
    if (!PopupBaseView::init()) {
        return false;
    }
    setIsHDPanel(true);
    CCLoadSprite::doResourceByCommonIndex(8, true);
    CCLoadSprite::doResourceByCommonIndex(11, true);
    CCLoadSprite::doResourceByCommonIndex(101, true);
    CCLoadSprite::doResourceByCommonIndex(305, true);
    CCLoadSprite::doResourceByCommonIndex(502, true);
    setCleanFunction([](){
        CCLoadSprite::doResourceByCommonIndex(8, false);
        CCLoadSprite::doResourceByCommonIndex(11, false);
        CCLoadSprite::doResourceByCommonIndex(101, false);
        CCLoadSprite::doResourceByCommonIndex(305, false);
        CCLoadSprite::doResourceByCommonIndex(502, false);
        CCLoadSprite::releaseDynamicResourceByType(CCLoadSpriteType_GOODS);
    });
    m_dataCount = RepayController::getInstance()->repayRewards.size();
    setTitleName("");
    auto tmpCCB = CCBLoadFile("RepayView",this,this);
    setContentSize(tmpCCB->getContentSize());
    auto size = CCDirector::sharedDirector()->getWinSize();
    float extH = getExtendHeight();
    float add =  size.height - 852;
    if (CCCommonUtils::isIosAndroidPad()) {
        add = size.height - 2048;
        add = add / 2.4;
    }
    m_bgNode->setPositionY(m_bgNode->getPositionY()-extH);
    auto tbg = CCLoadSprite::loadResource("Bottom frame04.png");
    auto tBatchNode = CCSpriteBatchNode::createWithTexture(tbg->getTexture());
    int maxHight = ceil(size.height*1.0/90);
    for (int j = 0; j<maxHight; j++)
    {
        for (int i=0; i<8; i++) {
            auto bg = CCLoadSprite::createSprite("Bottom frame04.png");
            bg->setAnchorPoint(ccp(0, 0));
            bg->setPosition(ccp(i*90, j*90));
            tBatchNode->addChild(bg);
        }
    }
    m_bgNode->addChild(tBatchNode);
    CCSize nodeRewardSize = m_nodeRewards->getContentSize();
    nodeRewardSize.height += extH;
    m_nodeRewards->setContentSize(nodeRewardSize);
    m_nodeRewards->setPositionY(m_nodeRewards->getPositionY()-extH);
    m_tabRewards = CCTableView::create(this, nodeRewardSize);
    m_tabRewards->setDirection(kCCScrollViewDirectionVertical);
    m_tabRewards->setVerticalFillOrder(kCCTableViewFillTopDown);
    m_tabRewards->setTouchPriority(Touch_Default);
    m_tabRewards->setDelegate(this);
    m_nodeRewards->addChild(m_tabRewards);
    
//    m_scrollPoints = CCScrollView::create(m_nodePoints->getContentSize());
//    m_scrollPoints->setDirection(kCCScrollViewDirectionHorizontal);
//    m_scrollPoints->setTouchEnabled(false);
//    m_nodePoints->addChild(m_scrollPoints);
//    m_scrollPoints->setPosition(ccp(0, 0));
    auto clipNode = CCClipNode::create(m_nodePoints->getContentSize().width, m_nodePoints->getContentSize().height);
    clipNode->setAnchorPoint(CCPointZero);
    m_nodePoints->addChild(clipNode);
    clipNode->setTag(REPAY_CLIP_NODE_TAG);
    CCNode *node = CCNode::create();
    clipNode->addChild(node);
    node->setTag(REPAY_CLIP_NODE_TAG);
    
    auto clipNode1 = CCClipNode::create(m_nodePoints->getContentSize().width - 45, m_nodePoints->getContentSize().height);
    m_nodePoints->addChild(clipNode1);
    clipNode1->setPosition(ccp(23,0));
    clipNode1->setTag(REPAY_CLIP_NODE_BAR_TAG);
    auto progress = CCLoadSprite::createScale9Sprite("01_03.png");
    progress->setAnchorPoint(ccp(0, 0.5));
    progress->setTag(REPAY_CLIP_NODE_BAR_TAG);
    clipNode1->addChild(progress);
    progress->setPreferredSize(CCSize(1, 26));
    progress->setPosition(ccp(2.5, 60));
//    setTitleName(_lang("133246"));
    m_lblTitle->setString(_lang("101100"));//距离累计充值大反馈结束还有
//    setButtonTitle(m_btnGoBuy, _lang("101221").c_str());
    m_lblPointTitle->setString(_lang("133247"));
    m_lblRewardTitle->setString(_lang("105848"));
    m_lblPointOrgW = m_lblPointTitle->getContentSize().width * m_lblPointTitle->getOriginScaleX();
    m_lblPointOrgX = m_lblPointTitle->getPositionX();
    onTimer(0);
    this->schedule(schedule_selector(RepayView::onTimer),1.0);
    initPointNode(true);
    
    CCPoint offset = m_tabRewards->getContentOffset();
    int newPoint = RepayController::getInstance()->getNewPayPoint();
    int lv = RepayController::getInstance()->getLVIndexByPoint(newPoint) - 3;
    float changeH = 0;
    while (lv>-1) {
        changeH += tableCellSizeForIndex(m_tabRewards, lv).height;
        lv--;
    }
    offset.y += changeH;
    m_tabRewards->setContentOffset(offset);
    return true;
}
示例#25
0
bool WatchtowerView::init(int buildId)
{
    if (!PopupBaseView::init()) {
        return false;
    }
    setIsHDPanel(true);
    CCLoadSprite::doResourceByCommonIndex(8, true,true);
    CCLoadSprite::doResourceByCommonIndex(500, true,true);
    setCleanFunction([](){
        CCLoadSprite::doResourceByCommonIndex(8, false,true);
        CCLoadSprite::doResourceByCommonIndex(500, false,true);
    });
    auto tbg = CCLoadSprite::loadResource("technology_09.png");
    auto tBatchNode = CCSpriteBatchNode::createWithTexture(tbg->getTexture());
    int maxHight = CCDirector::sharedDirector()->getWinSize().height;
    int curHight = -500;
    while (curHight<maxHight) {
        auto bg = CCLoadSprite::createSprite("technology_09.png");
        bg->setAnchorPoint(ccp(0, 1));
        bg->setPosition(ccp(0, curHight));
        curHight += bg->getContentSize().height;
        tBatchNode->addChild(bg);
        if (CCCommonUtils::isIosAndroidPad())
        {
            bg->setScale(2.4f);
        }
    }
    this->addChild(tBatchNode);
    m_buildId = buildId;
    auto tmpCCB = CCBLoadFile("WatchtowerView",this,this);
    this->setContentSize(tmpCCB->getContentSize());
    
    setTitleName(_lang("102160").c_str());
    m_callCount = 10;
    m_tabView = NULL;
    m_buildBG->setVisible(false);
    if (!CCCommonUtils::isIosAndroidPad()) {
        int oldBgHeight = m_buildBG->getContentSize().height;
        changeBGHeight(m_buildBG);
        int newBgHeight = m_buildBG->getContentSize().height;
        int extH = getExtendHeight();
        int addHeight = newBgHeight - oldBgHeight;
        int oldWidth = m_infoList->getContentSize().width;
        int oldHeight = m_infoList->getContentSize().height;
        //    m_infoList->setPositionY(m_infoList->getPositionY()-addHeight);
        m_infoList->setContentSize(CCSizeMake(oldWidth, oldHeight+extH));
        m_bottomNode->setPositionY(m_bottomNode->getPositionY() - extH);
        
        bool flag = false;
        if (ActivityController::getInstance()->aActivityInfo.activityST<=0 || ActivityController::getInstance()->aActivityInfo.siegeET<=0 ||ActivityController::getInstance()->aActivityInfo.round==0) {
            MonsterSiegeActivityInfoCommand* cmd = new MonsterSiegeActivityInfoCommand();
            cmd->setCallback(CCCallFuncO::create(this, callfuncO_selector(WatchtowerView::getInfoCallBack), NULL));
            cmd->sendAndRelease();
        }else{
            double prevTime = GlobalData::shared()->getWorldTime() - ActivityController::getInstance()->aActivityInfo.activityST;
            double gapTime = ActivityController::getInstance()->aActivityInfo.activityET - GlobalData::shared()->getWorldTime() ;
            double gapEnd = ActivityController::getInstance()->aActivityInfo.siegeET - GlobalData::shared()->getWorldTime();
            flag = ActivityController::getInstance()->aActivityInfo.activityST>0 && gapEnd>0 && gapTime>0 && prevTime>=0 && GlobalData::shared()->playerInfo.isInAlliance();
        }
        if(flag){
            showMonsterInfo();
        }
    }
    m_tabView = CCMultiColTableView::create(this, m_infoList->getContentSize());
    m_tabView->setDirection(kCCScrollViewDirectionVertical);
    m_tabView->setVerticalFillOrder(kCCTableViewFillTopDown);
    m_tabView->setMultiColTableViewDelegate(this);
    m_tabView->setTouchPriority(Touch_Popup);
    m_infoList->addChild(m_tabView);
    
    m_msgLabel->setString(_lang("108647"));
    
    FunBuildInfo& m_info = FunBuildController::getInstance()->getFunbuildById(m_buildId);
    
    string title = _lang(m_info.name)+" "+_lang_1("102272", CC_ITOA(m_info.level));
    if(FunBuildController::getInstance()->checkOpenUpstar(m_info.type)
       && FunBuildController::getInstance()->building_Miracle_open){
        if(m_info.starNum >= 1){
            title = _lang(m_info.name) +" "+ _lang("160001");
            title.append(" ");
            title.append(CC_ITOA(m_info.starNum));
        }
    }
    setTitleName(title.c_str());
    CCCommonUtils::setButtonTitle(m_ignoreBtn, _lang("139500").c_str());
    if (EnemyInfoController::getInstance()->m_enemyInfos.size() > 0) {
        m_bottomNode->setVisible(true);
    }
    else
        m_bottomNode->setVisible(false);
    updateInfo(NULL);
    
    return true;
}
示例#26
0
/**
\param emp
\param parent
**/
BcExtractoView::BcExtractoView ( BfCompany *company, QWidget *parent, int ) : BfForm ( company, parent )
{
    BL_FUNC_DEBUG
    setupUi ( this );

    setAttribute(Qt::WA_DeleteOnClose);
    setTitleName ( _ ( "Extracto de cuentas" ) );
    setDbTableName ( "mayor" );

    mui_list->setMainCompany ( company );

    connect (mui_list, SIGNAL(openAsiento()), this, SLOT(openAsiento()) );

    /// Iniciamos los componentes
    mui_cuentaInicial->setMainCompany ( company );
    mui_cuentaInicial->setLabel ( _ ( "Cuenta inicial:" ) );
    mui_cuentaInicial->setTableName ( "cuenta" );
    mui_cuentaInicial->setFieldId("idcuenta");
    mui_cuentaInicial->m_valores["descripcion"] = "";
    mui_cuentaInicial->m_valores["codigo"] = "";

    mui_cuentaFinal->setMainCompany ( company );
    mui_cuentaFinal->setLabel ( _ ( "Cuenta Final:" ) );
    mui_cuentaFinal->setTableName ( "cuenta" );
    mui_cuentaFinal->setFieldId("idcuenta");
    mui_cuentaFinal->m_valores["descripcion"] = "";
    mui_cuentaFinal->m_valores["codigo"] = "";

    mui_codigoContrapartida->setMainCompany ( company );
    mui_codigoContrapartida->setLabel ( _ ( "Cuenta contrapartida:" ) );
    mui_codigoContrapartida->setTableName ( "cuenta" );
    mui_codigoContrapartida->setFieldId("idcuenta");
    mui_codigoContrapartida->m_valores["descripcion"] = "";
    mui_codigoContrapartida->m_valores["codigo"] = "";


    mui_cuentaInicial->hideLabel();
    mui_cuentaFinal->hideLabel();
    mui_codigoContrapartida->hideLabel();

    /// Iniciamos los componentes de la fecha para que al principio aparezcan
    /// como el a&ntilde;o inicial.
    QString cadena;
    cadena.sprintf ( "%2.2d/%2.2d/%4.4d", 1, 1, QDate::currentDate().year() );
    mui_fechaInicial->setText ( cadena );
    cadena.sprintf ( "%2.2d/%2.2d/%4.4d", 31, 12, QDate::currentDate().year() );
    mui_fechaFinal->setText ( cadena );
    m_cursorcta = NULL;
    insertWindow ( windowTitle(), this, false );

    m_tratarpunteos = true;


    /// Conectamos los botones del menu con las acciones de esta ventana.
/*
    connect (((BfBulmaFact *)g_main)->actionSiguiente, SIGNAL(triggered()), this, SLOT(botonSiguiente()));
    connect (((BfBulmaFact *)g_main)->actionAnterior, SIGNAL(triggered()), this, SLOT(botonAnterior()));
    connect (((BfBulmaFact *)g_main)->actionInicio, SIGNAL(triggered()), this, SLOT(botonInicio()));
    connect (((BfBulmaFact *)g_main)->actionFin, SIGNAL(triggered()), this, SLOT(botonFin()));
*/
    /// Llamamos a los scripts
    blScript(this);

    
}
示例#27
0
bool StoreView::init()
{
    if (!PopupBaseView::init()) {
        return false;
    }
    setIsHDPanel(true);
    CCLoadSprite::doResourceByCommonIndex(11, true);
    CCLoadSprite::doResourceByCommonIndex(8, true);
    setCleanFunction([](){
        CCLoadSprite::doResourceByCommonIndex(11, false);
        CCLoadSprite::doResourceByCommonIndex(8, false);
        CCLoadSprite::releaseDynamicResourceByType(CCLoadSpriteType_GOODS);
    });
    auto tmpCCB = CCBLoadFile("StoreView",this,this);
    this->setContentSize(tmpCCB->getContentSize());
    
    setTitleName(_lang("102160").c_str());
    
    int oldBgHeight = m_buildBG->getContentSize().height;
    changeBGHeight(m_buildBG);
    int newBgHeight = m_buildBG->getContentSize().height;
    int addHeight = newBgHeight - oldBgHeight;
    int oldWidth = m_infoList->getContentSize().width;
    int oldHeight = m_infoList->getContentSize().height;
    m_infoList->setPositionY(m_infoList->getPositionY()-addHeight);
    m_infoList->setContentSize(CCSizeMake(oldWidth, oldHeight+addHeight));
    
    int bgcount = newBgHeight/100+1;
//    for (int i = 0; i<=bgcount; i++) {
//        auto pic = CCLoadSprite::createSprite("technology_09.png");
//        pic->setPositionY(-i*100);
//        pic->setScaleX(0.98);
//        if (CCCommonUtils::isIosAndroidPad())
//        {
//            pic->setPositionY((i-3)*100);
//            pic->setScaleX(2.4f);
//            pic->setAnchorPoint(ccp(0, 1));
////            pic->setVisible(false);
//        }
//        m_BGNode->addChild(pic);
//    }
    
    CCCommonUtils::setButtonTitle(m_storeBtn, _lang("104900").c_str());
    CCCommonUtils::setButtonTitle(m_bagBtn, _lang("104901").c_str());
//    CCCommonUtils::setButtonTitle(m_warBtn, _lang("104902").c_str());
//    CCCommonUtils::setButtonTitle(m_spdBtn, _lang("108522").c_str());
//    CCCommonUtils::setButtonTitle(m_resBtn, _lang("104904").c_str());
//    CCCommonUtils::setButtonTitle(m_othBtn, _lang("104905").c_str());
    
    m_tabView = CCTableView::create(this, m_infoList->getContentSize());
    m_tabView->setDirection(kCCScrollViewDirectionVertical);
    m_tabView->setVerticalFillOrder(kCCTableViewFillTopDown);
    m_tabView->setTouchPriority(Touch_Default);
    m_infoList->addChild(m_tabView);
    
    m_cityLv = FunBuildController::getInstance()->getMainCityLv();
    
//    m_packView = BackpackView::create();
//    this->addChild(m_packView,100000);
//    m_packView->setVisible(false);
    if(m_type==STORE_TYPE_GOTO_STORE){
        m_type=0;
    }else{
        int count = ToolController::getInstance()->getTotalCountInBag();
        if(count>0){
            m_type = 1;
        }else{
            m_type = 0;
        }
    }
    ToolController::getInstance()->m_currentUseItemId=0;
    m_bagView = StoreBagView::create();
    m_mallView = StoreMallView::create();
    float dy = 852-170;
    if(CCCommonUtils::isIosAndroidPad())
        dy = 2048-340;
    m_mallView->setPositionY(-dy);
    m_bagView->setPositionY(-dy);
//    m_mallView->setVisible(false);
//    m_bagView->setVisible(false);
    m_page = 2;

    updateInfo();
    
    return true;
}