예제 #1
0
void  STOK_HIZMET_KARTI_FORMU::SETUP_FORM()
{
    SET_HELP_PAGE       ( "stok-islemleri_hizmet-karti" );
    SET_PAGE_TITLE      ( tr ("STK - HİZMET KARTI") );

    REGISTER_BUTTONS_WIDGET ( m_ui->navigation_buttons_widget );

    SET_SETTING_NAME        ( "FATURA_HIZMET_KARTI" );
    SET_FIRST_FOCUS_WIDGET  ( m_ui->lineEdit_hizmet_kodu );

    m_temel_para_birimi_kodu = DVZ_GET_TEMEL_PARA_BIRIMI_KODU ();

    REGISTER_SAVER_BUTTON( m_ui->pushButton_hizmetin_hareketleri );

    if ( K9_KULLANICI_URUN_HAREKETLERINI_GOREBILIR_MI() EQ HAYIR ) {
        m_ui->pushButton_hizmetin_hareketleri->setVisible( false );
    }

    // [ 1 ] Hassasiyet setleniyor
    int stok_birim_fiyat_hassasiyeti = STK_GET_BIRIM_HASSASIYETI();

    m_ui->commaEdit_alis_fiyati->SET_PRECISION( stok_birim_fiyat_hassasiyeti );
    m_ui->commaEdit_satis_fiyati->SET_PRECISION( stok_birim_fiyat_hassasiyeti );
    // [/1]
     

    DVZ_FILL_COMBOBOX         ( m_ui->comboBox_alis_doviz_cinsi   );
    DVZ_FILL_COMBOBOX         ( m_ui->comboBox_satis_doviz_cinsi  );
    K9_FILL_KDV_ORANLARI_COMBOBOX  ( m_ui->comboBox_alis_kdv_orani          );
    K9_FILL_KDV_ORANLARI_COMBOBOX  ( m_ui->comboBox_satis_kdv_orani          );

    m_ui->lineEdit_hizmet_kodu->setMaxLength                ( 30 );
    m_ui->lineEdit_barkod_no->setMaxLength                  ( 50 );
    m_ui->lineEdit_hizmet_ismi->setMaxLength                ( 50 );

    m_ui->limitedTextEdit->SET_LINE_LIMIT(5);
    m_ui->limitedTextEdit->SET_MAX_STRING_LENGTH(512);
    m_ui->lineEdit_hizmet_birimi->setMaxLength(20);

    m_muh_hesap_id = 0;

    m_ui->comboBox_hizmet_turu->addItems(QStringList() << QObject::tr("Alınan Hizmet") << QObject::tr("Satılan Hizmet") << QObject::tr( "Alınan / Satılan Hizmet") );


    DISABLE_CLEAR_ON_WIDGET(m_ui->searchEdit_muh_hesap_kodu);
    DISABLE_CLEAR_ON_WIDGET(m_ui->lineEdit_muh_hesap_ismi);

    QString hizmetler_hesap_kodu, hizmetler_hesap_adi;

    m_muh_hesap_id = SUBE_GET_SUBE_ENT_HESAP_ID( SUBE_GET_SUBE_ID(), "hizmetler_ent_hesap_id", &hizmetler_hesap_kodu, &hizmetler_hesap_adi );

    m_ui->searchEdit_muh_hesap_kodu->SET_TEXT   ( hizmetler_hesap_kodu );
    m_ui->lineEdit_muh_hesap_ismi->setText      ( hizmetler_hesap_adi  );

    if ( K9_KULLANICI_ENT_BILGILERINI_DEGISTIREBILIR_MI() EQ 0 ) {
        m_ui->searchEdit_muh_hesap_kodu->setHidden(true);
        m_ui->lineEdit_muh_hesap_ismi->setHidden(true);
        m_ui->label_muhasebe_hesabi->setHidden(true);
    }
}
void KULLANICILAR_FORMU::SETUP_FORM ()
{

    m_ui->table_widget_bilgisayarlar->hideColumn     ( 0 );
    m_ui->table_widget_veritabanlari->hideColumn     ( 0 );

    QFont bilgisayar_tableWidget_font = m_ui->table_widget_bilgisayarlar->font();
    int   point_size = bilgisayar_tableWidget_font.pointSize();
    point_size -= 1;
    bilgisayar_tableWidget_font.setPointSize  ( point_size );
    m_ui->table_widget_bilgisayarlar->setFont ( bilgisayar_tableWidget_font );


    m_ui->table_widget_bilgisayarlar->setColumnWidth ( BILGISAYAR_KODU_COLUMN,      110 );
    m_ui->table_widget_bilgisayarlar->setColumnWidth ( BILGISAYAR_ADI_COLUMN,       180 );
    m_ui->table_widget_bilgisayarlar->setColumnWidth ( DONGLE_IP_COLUMN,            100 );
    m_ui->table_widget_bilgisayarlar->setColumnWidth ( MAC_ADRESI_KABLOLU_COLUMN,   135 );
    m_ui->table_widget_bilgisayarlar->setColumnWidth ( MAC_ADRESI_KABLOSUZ_COLUMN,  140 );
    m_ui->table_widget_bilgisayarlar->setColumnWidth ( MAC_ADRESI_3G_COLUMN,        135 );


    REGISTER_BUTTONS_WIDGET ( m_ui->navigation_buttons_widget );

    REGISTER_CHANGER_BUTTON ( m_ui->button_bilgisayar_sec );
    REGISTER_CHANGER_BUTTON ( m_ui->button_veritabani_sec );

    REGISTER_SAVER_BUTTON   ( m_ui->pushButton_yetki_ata );

    SET_PAGE_TITLE    ( tr ( "USERS" ) );
    SET_SETTING_NAME  ( "KULLANICILAR_FORMU" );
    SET_HELP_PAGE     ( "yonetim-islemleri_kullanicilar" );

    m_ui->lineEdit_email->setMaxLength(50);
    m_ui->line_edit_email_kullanici_adi->setMaxLength(50);
    m_ui->lineEdit_kullanici_adi->setMaxLength(50);
    m_ui->lineEdit_kullanici_kodu->setMaxLength(10);
    m_ui->line_edit_yeni_sifre->setMaxLength(50);
    m_ui->line_edit_yeni_sifre_tekrar->setMaxLength(50);
    m_ui->limitedTextEdit_not->SET_LINE_LIMIT(5);
    m_ui->limitedTextEdit_not->SET_MAX_STRING_LENGTH(99);

    SET_FIRST_FOCUS_WIDGET( m_ui->lineEdit_kullanici_kodu );
}
예제 #3
0
void  BNK_VIRMAN_FORMU::SETUP_FORM ()
{
    SET_PAGE_TITLE    (tr ( "BNK - BANKA VİRMAN FORMU" ) );
    SET_HELP_PAGE     ("banka-islemleri_banka-virman-formu");

    REGISTER_BUTTONS_WIDGET ( m_ui->kernel_buttons_widget );

    REGISTER_SAVER_BUTTON( m_ui->pushButton_urettigi_fisler );

    if ( K9_KULLANICI_FISIN_URETTIGI_ENT_FISLERINI_GOREBILIR_MI() EQ HAYIR ) {
        m_ui->pushButton_urettigi_fisler->setVisible( false );
    }

    m_ui->commaEdit_kur->setVisible( false );
    m_ui->label_kur->setVisible( false );
     
    M_FIS           = new BNK_DEFTER_FIS_STRUCT;
    M_FIS_SATIRI    = new BNK_DEFTER_FIS_SATIRI_STRUCT;

    if( K9_KULLANICININ_CALISTIGI_SIRKET() EQ SIRKET_1 ){
        m_ent_filtresi_turu =  FIS_BIRINCI_SIRKET;   
    }else {
        m_ent_filtresi_turu =  FIS_HER_IKI_SIRKET;
    }

    FIND_AND_SET_COMBOBOX_TEXT(m_ui->comboBox_sirket_turu , K9_GET_KAYDEDILECEK_SIRKET_STRING( K9_KULLANICININ_CALISTIGI_SIRKET() ) );

    DISABLE_CLEAR_ON_WIDGET( m_ui->comboBox_fis_filtresi );

    m_ui->adakDate_tarih->SET_DATE( QDate::currentDate() );
    m_ui->comboBox_fis_filtresi->setVisible( false );
    m_ui->label_fis_filtresi->setVisible(false);

    m_ui->comboBox_sirket_turu->setVisible(false);
    m_ui->label_sirket->setVisible(false);

    K9_FILL_COMBOBOX_KAYDEDILECEK_SIRKET ( m_ui->comboBox_sirket_turu);

    K9_FILL_COMBOBOX_FIS_FILTRESI( m_ui->comboBox_fis_filtresi );

    BNK_FILL_COMBO_BOX_BANKA_HESAPLARI ( m_ui->comboBox_gonderen_hesap );
    BNK_FILL_COMBO_BOX_BANKA_HESAPLARI ( m_ui->comboBox_alici_hesap    );

    if ( K9_KULLANICI_SIRKET_DEGISTIRE_BILIR_MI() EQ EVET ) {
        m_ui->comboBox_fis_filtresi->setVisible( true );
        m_ui->label_fis_filtresi->setVisible(true);

        m_ui->label_sirket->setVisible(true);
        m_ui->comboBox_sirket_turu->setVisible( true );
    }

    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_fis_filtresi, K9_GET_FIS_FILTRESI_STRING( m_ent_filtresi_turu ));

    SET_FIRST_FOCUS_WIDGET ( m_ui->lineEdit_fis_no );
    SET_SETTING_NAME       ( "BANAKA_VIRMAN_FORMU" );

    m_ui->commaEdit_gonderen_tutar->SET_PRECISION      ( 2 );
    m_ui->commaEdit_alan_tutar->SET_PRECISION          ( 2 );
    m_ui->commaEdit_kur->SET_PRECISION                 ( 4 );


    m_ui->limitedTextEdit_aciklama->SET_MAX_STRING_LENGTH       ( 512);
    m_ui->lineEdit_gonderen_hesap_adi->setMaxLength             ( 50 );
    m_ui->lineEdit_alici_hesap_adi->setMaxLength                ( 50 );
    m_ui->commaEdit_gonderen_tutar->setMaxLength                ( 15 );
    m_ui->commaEdit_alan_tutar->setMaxLength                    ( 15 );
    m_ui->commaEdit_kur->setMaxLength                           ( 8  );
    m_ui->lineEdit_fis_no->setMaxLength                         ( 10 );

    DISABLE_CLEAR_ON_WIDGET( m_ui->adakDate_tarih );

    AUTOSTART_FORM_KERNEL( m_form_id );

}
예제 #4
0
void  SMM_MAKBUZ_FORMU::SETUP_FORM ()
{
    if ( m_makbuz_turu EQ SMM_ALIS_MAKBUZU ) {
        SET_PAGE_TITLE    ( tr ( "SMM - SERBEST MESLEK MAKBUZU (ALIŞ)" ) );
        SET_HELP_PAGE     ("serbest-meslek-makbuzu-alis");
    }
    else {
        SET_PAGE_TITLE    ( tr ( "SMM - SERBEST MESLEK MAKBUZU (SATIŞ)" ) );
        SET_HELP_PAGE     ("serbest-meslek-makbuzu-satis");
    }

    REGISTER_SAVER_BUTTON( m_ui->pushButton_urettigi_fisler );
    if ( K9_KULLANICI_FISIN_URETTIGI_ENT_FISLERINI_GOREBILIR_MI() EQ HAYIR ) {
        m_ui->pushButton_urettigi_fisler->setVisible( false );
    }

    REGISTER_BUTTONS_WIDGET ( m_ui->kernel_buttons_widget );

    SET_SETTING_NAME       ( "SMM_MAKBUZ_FORMU" );
    SET_FIRST_FOCUS_WIDGET ( m_ui->lineEdit_smmm_no );

    M_ENT_DETAYLARI   = new SMM_ENT_DETAYLARI;
    M_MAKBUZ          = new SMM_MAKBUZ_STRUCT;

    BNK_FILL_COMBO_BOX_BANKA_HESAPLARI( m_ui->comboBox_banka_hesap_kodu );

    SMM_CLEAR_MAKBUZ_STRUCT(M_MAKBUZ);

    m_ui->lineEdit_smmm_no->setText("*");
    m_ui->lineEdit_smmm_no->setMaxLength(10);

    DISABLE_CLEAR_ON_WIDGET(m_ui->lineEdit_smmm_no);
    DISABLE_CLEAR_ON_WIDGET ( m_ui->comboBox_fis_filtresi);
    DISABLE_CLEAR_ON_WIDGET ( m_ui->comboBox_sirket );

    K9_FILL_COMBOBOX_KAYDEDILECEK_SIRKET( m_ui->comboBox_sirket );

    if ( K9_KULLANICININ_CALISTIGI_SIRKET() EQ SIRKET_1 ) {
        m_entegre_filtresi = FIS_BIRINCI_SIRKET;
        M_MAKBUZ->kaydedilecek_sirket = SIRKET_1;
    }
    else {
        m_entegre_filtresi = FIS_HER_IKI_SIRKET;
        M_MAKBUZ->kaydedilecek_sirket = SIRKET_2;
    }

    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_sirket, K9_GET_KAYDEDILECEK_SIRKET_STRING( M_MAKBUZ->kaydedilecek_sirket ));

    K9_FILL_COMBOBOX_FIS_FILTRESI(m_ui->comboBox_fis_filtresi);

    if ( K9_KULLANICI_ENT_BILGILERINI_DEGISTIREBILIR_MI() EQ HAYIR ) {
        m_ui->pushButton_detaylar->setVisible( false );
    }

    if ( K9_KULLANICI_SIRKET_DEGISTIRE_BILIR_MI() EQ HAYIR ) {
        m_ui->label_fis_filtresi->setVisible( false);
        m_ui->comboBox_fis_filtresi->setVisible( false );

        m_ui->comboBox_sirket->setVisible( false );
        m_ui->label_sirket->setVisible( false );
    }
    m_ui->comboBox_fis_filtresi->setCurrentIndex(m_ui->comboBox_fis_filtresi->findText(K9_GET_FIS_FILTRESI_STRING(m_entegre_filtresi)));

    M_KDV_ORANLARI_ARRAY              = new double [KDV_OTV_ORANLARI_SAYISI];
    M_INDIRILECEK_KDV_HESABI_ID_ARRAY = new int [KDV_OTV_ORANLARI_SAYISI];
    M_TEVKIFAT_HESAPLARI_ID_ARRAY     = new int [KDV_OTV_ORANLARI_SAYISI];

    GET_VERGI_DAIRELERI(m_ui->comboBox_vergi_dairesi);

    SQL_QUERY query(DB);

    query.PREPARE_SELECT("k9_sabit_degerler" , "ontanimli_kdv_orani,kdv_oranlari_array,ind_kdv_hesap_id_array,"
                         "tevkifat_kdv_hesap_id_array",
                         "sabit_deger_id = :sabit_deger_id");
    query.SET_VALUE(":sabit_deger_id" , 1);

    if ( query.SELECT() NE 0 ) {
        query.NEXT();
        m_ontanimli_kdv_orani = query.VALUE(0).toDouble();
        UNPACK_DOUBLE_ARRAY(query.VALUE(1).toString() , M_KDV_ORANLARI_ARRAY , KDV_OTV_ORANLARI_SAYISI);
        UNPACK_INT_ARRAY(query.VALUE(2).toString()    , M_INDIRILECEK_KDV_HESABI_ID_ARRAY , KDV_OTV_ORANLARI_SAYISI );
        UNPACK_INT_ARRAY(query.VALUE(3).toString()    , M_TEVKIFAT_HESAPLARI_ID_ARRAY , KDV_OTV_ORANLARI_SAYISI);
    }


    m_ui->limitedTextEdit_aciklama->SET_MAX_STRING_LENGTH(512);
    m_ui->limitedTextEdit_adres->SET_MAX_STRING_LENGTH(512);
    SET_COMBOBOX_LENGTH(m_ui->comboBox_vergi_dairesi , 50);
    m_ui->lineEdit_vergi_numarasi->setMaxLength(15);
    m_ui->lineEdit_sm_sicil_numarasi->setMaxLength(20);
    m_ui->lineEdit_belge_seri->setMaxLength(3);
    m_ui->lineEdit_belge_numarasi->setMaxLength(15);



    DISABLE_CLEAR_ON_WIDGET(m_ui->comboBox_kdv_orani);

    K9_FILL_KDV_ORANLARI_COMBOBOX(m_ui->comboBox_kdv_orani);

    m_sube_kasa_hesap_id                   = SUBE_GET_UNITE_MUH_KASA_HESABI_ID();


    SET_COMBOBOX_LENGTH(m_ui->comboBox_hizmet_turu , 128);

    query.PREPARE_SELECT("smm_hizmetler" ,"hizmet_adi" ,"hizmet_turu = :hizmet_turu");

    if ( m_makbuz_turu EQ SMM_ALIS_MAKBUZU ) {
        query.SET_VALUE(":hizmet_turu" , SMM_ALINAN_HIZMET);
    }
    else {
        query.SET_VALUE(":hizmet_turu" , SMM_SATILAN_HIZMET);
    }
    if ( query.SELECT() NE 0 ) {
        while ( query.NEXT() ) {
            m_ui->comboBox_hizmet_turu->addItem(query.VALUE(0).toString());
        }
    }
    else {
        MSG_WARNING( tr("Hizmet Alış/Satış tanımlamalısınız.!"), NULL );
    }
    m_ui->comboBox_hizmet_turu->setCurrentIndex(-1);

    m_ui->comboBox_tah_odm_sekli->addItems(QStringList() << QObject::tr("Nakit")<< QObject::tr("Kredi Kartı")
                                   << QObject::tr("Havale")<< QObject::tr("Eft"));

    m_ui->comboBox_tah_odm_sekli->setCurrentIndex(-1);

    m_ui->comboBox_tah_odm_sekli->setEditable(false);

    m_ui->comboBox_hizmet_turu->setEditable(false);

    REGISTER_CHANGER_BUTTON ( m_ui->pushButton_detaylar );
    REGISTER_SAVER_BUTTON   ( m_ui->pushButton_yazdir   );

    AUTOSTART_FORM_KERNEL( m_form_id );
}
void PRS_PUANTAJLARI_GOR_VE_DUZELT_FISI::SETUP_FORM()
{
    SET_PAGE_TITLE    ( tr ( "PRS - PUANTAJ TABLOSU" ) );
    SET_HELP_PAGE     (      "maas-bordrosu" );

    SET_SINGLE_RECORD_ID (m_record_id);

    REGISTER_BUTTONS_WIDGET ( m_ui->navigation_button_widget );

    int num_of_columns = 13;

    REGISTER_SAVER_BUTTON( m_ui->push_button_bordro_al );

    REGISTER_TABLE_WIDGET       ( m_ui->table_widget_gun_satirlari , num_of_columns );
    SET_FIS_ORDER_COLUMN_NUMBER ( ORDER_COLUMN );
    SET_FORM_ID_COLUMN_POSITION ( RECORD_ID_COLUMN );
    SET_ROW_ID_COLUMN_POSITION  ( ROW_ID_COLUMN );
    SET_NUMBER_OF_HIDDEN_COLUMN ( 5 );

    SET_FIS_ORDER_DATABASE ("puantaj_bilgileri", "order_number", "personel_id" );

    SET_TABLE_ROW_WIDGETS ( ADI_COLUMN                  , WIDGET_LINE_EDIT );
    SET_TABLE_ROW_WIDGETS ( CALISTIGI_GUN_COLUMN        , WIDGET_COMMA_EDIT);
    SET_TABLE_ROW_WIDGETS ( ALDIGI_UCRET                , WIDGET_COMMA_EDIT);
    SET_TABLE_ROW_WIDGETS ( EK_ODENEK_TUTARI            , WIDGET_COMMA_EDIT);
    SET_TABLE_ROW_WIDGETS ( EK_KESINTI_TUTARI           , WIDGET_COMMA_EDIT);
    SET_TABLE_ROW_WIDGETS ( KUR_COLUMN                  , WIDGET_COMMA_EDIT);
    SET_TABLE_ROW_WIDGETS ( TEMEL_PARABIRIMI_UCRET      , WIDGET_COMMA_EDIT);
    SET_TABLE_ROW_WIDGETS ( CALISMA_SEKLI               , WIDGET_LINE_EDIT );
    SET_TABLE_ROW_WIDGETS ( YEMEK_VERILEN_GUN_SAYISI    , WIDGET_COMMA_EDIT);
    SET_TABLE_ROW_WIDGETS ( GUNLUK_UCRET                , WIDGET_COMMA_EDIT);

    SET_FIRST_FOCUS_WIDGET ( m_ui->table_widget_gun_satirlari);

    SET_SETTING_NAME  ("PRS_PUANTAJ_GOR_VE_DUZELT_FISI");

    m_ui->table_widget_gun_satirlari->setHorizontalHeaderLabels (QStringList() << "row_id" << "record_id"
            << "order_number_column" << tr("") << tr("")<< tr("Adı / Soyadı")
            << tr( "Brüt/Net Ücret" )<< tr("Ek \nÖdenek Tutarı") << tr("Ek \nKesinti Tutarı")
            << tr("Kur") << tr( "Personel Ücret" ) << tr("Yemek Verilen\nGün Sayısı ") << tr("Çalıştığı Gün") << "" <<"" << "");

    m_ui->table_widget_gun_satirlari->setColumnWidth( ADI_COLUMN                    , 200 );
    m_ui->table_widget_gun_satirlari->setColumnWidth( ALDIGI_UCRET                  , 100 );
    m_ui->table_widget_gun_satirlari->setColumnWidth( EK_ODENEK_TUTARI              , 100 );
    m_ui->table_widget_gun_satirlari->setColumnWidth( EK_KESINTI_TUTARI             , 100 );
    m_ui->table_widget_gun_satirlari->setColumnWidth( KUR_COLUMN                    , 100 );
    m_ui->table_widget_gun_satirlari->setColumnWidth( TEMEL_PARABIRIMI_UCRET        , 100 );
    m_ui->table_widget_gun_satirlari->setColumnWidth( CALISTIGI_GUN_COLUMN          , 100 );
    m_ui->table_widget_gun_satirlari->setColumnWidth( YEMEK_VERILEN_GUN_SAYISI      , 100 );

    m_ui->lineEdit_ay->setDisabled(true);
    m_ui->lineEdit_yil->setDisabled(true);
    m_ui->lineEdit_sube_adi->setDisabled(true);
    m_ui->lineEdit_sube_kodu->setDisabled(true);

    DISABLE_CLEAR_ON_WIDGET(m_ui->lineEdit_sube_kodu);
    DISABLE_CLEAR_ON_WIDGET(m_ui->lineEdit_sube_adi);
    DISABLE_CLEAR_ON_WIDGET(m_ui->lineEdit_yil);
    DISABLE_CLEAR_ON_WIDGET(m_ui->lineEdit_ay);

    QString sube_kodu, sube_adi;

    SUBE_GET_SUBE_KODU_ADI( m_sube_id, &sube_kodu, &sube_adi );

    m_ui->lineEdit_sube_kodu->setText   ( sube_kodu );
    m_ui->lineEdit_sube_adi->setText    ( sube_adi  );

    m_ui->lineEdit_yil->setText(QVariant(m_bordro_yili).toString());

    m_ui->lineEdit_ay->setText(QDate::longMonthName(m_bordro_ayi));

    FOCUS_FIRST_WIDGET ();
}
void FAT_TOPLU_FATURALASTIR_ARAMA::SETUP_FORM()
{
    SQL_QUERY query ( DB );

    SET_HELP_PAGE( "fatura-islemleri_satis-toplu-irsaliye-faturalastirma" );
    SET_PAGE_TITLE( tr ( "FAT - TOPLU İRSALİYE FATURALAŞTIRMA" ) );

    SET_NAME_OF_RUN_BATCH_BUTTON    ( "Faturala" );

    REGISTER_TABLE_WIDGET           ( m_ui->tableWidget );
    REGISTER_ARAMA_BUTTONS_WIDGET   ( m_ui->widget_batch_buttons );

    SET_FIRST_FOCUS_WIDGET          ( m_ui->searchEdit_cari_hesap_kodu );

    REGISTER_SAVER_BUTTON           ( m_ui->toolButton_faturalastir );

    SET_FIRST_FOCUS_WIDGET          ( m_ui->adakDate_irs_baslangic_tarihi );

    //! default value
    m_ui->toolButton_faturalastir->setEnabled(  false );

    m_ui->checkBox_irsaliye_tarih_araligi->setChecked( true );
    m_ui->frame_irsaliye_tarih_araligi->setEnabled   ( true );

    m_ui->checkBox_fatura_tarihi->setEnabled( false );
    m_ui->frame_gruplar->setEnabled( false );
    m_ui->frame_cari_hesap_kodu->setEnabled( false );

    //! end

    m_sube_id  = SUBE_GET_SUBE_ID();

    if ( SUBE_GET_SUBE_ISLEM_YETKISI() EQ SADECE_UNITE_SUBESINDE ) {
      m_ui->frame_sube->setVisible( false );
      m_ui->checkBox_sube_kodu->setVisible( false );
    }
    else {
        QString sube_kodu, sube_adi;
        SUBE_GET_SUBE_KODU_ADI( m_sube_id, &sube_kodu, &sube_adi );

        m_ui->searchEdit_sube_kodu->SET_TEXT( sube_kodu) ;
        m_ui->lineEdit_sube_ismi->setText   ( sube_adi );
    }

    m_irs_faturalandirilacak_gun_sayisi = 0;

    query.PREPARE_SELECT ( "e9_sabit_degerler","irs_faturalandirilacak_gun" ,"sabit_deger_id = :sabit_deger_id" );
    query.SET_VALUE(":sabit_deger_id" , 1);

    if ( query.SELECT() > 0 ) {
        query.NEXT();
        m_irs_faturalandirilacak_gun_sayisi = query.VALUE(0).toInt();
    }

    int bas_tarihi_gunu = m_ui->adakDate_fatura_tarihi->QDATE().day() - m_irs_faturalandirilacak_gun_sayisi;

    if ( bas_tarihi_gunu > 0 ) {
        m_ui->adakDate_irs_baslangic_tarihi->SET_DATE(  QDate(m_ui->adakDate_fatura_tarihi->QDATE().year(),
                                                         m_ui->adakDate_fatura_tarihi->QDATE().month(),
                                                         bas_tarihi_gunu)  );
    }
    else {
        bas_tarihi_gunu += m_irs_faturalandirilacak_gun_sayisi;
        m_ui->adakDate_irs_baslangic_tarihi->SET_DATE( QDate ( m_ui->adakDate_fatura_tarihi->QDATE().year(),
                                                         m_ui->adakDate_fatura_tarihi->QDATE().month(),
                                                         bas_tarihi_gunu ) );
    }

    SET_HEADERS ( QStringList() <<tr("Fiş No")<<tr("Fiş Tarihi")<<tr("Cari Hesap Adı")<<tr("Fiş Tutarı") );
    SET_SORTING ( false );

    m_ui->tableWidget->setColumnWidth ( 0, 50  );
    m_ui->tableWidget->setColumnWidth ( 1, 100 );
    m_ui->tableWidget->setColumnWidth ( 2, 200 );
    m_ui->tableWidget->setColumnWidth ( 3, 100 );

    SET_ENTER_KEY_FOR_RUN_BATCH ( true );    
    SET_SETTING_NAME    ( "FAT_TOPLU_FATURALASTIR_ARAMA" );
}
예제 #7
0
void SQL_TABLOLAR_FISI::SETUP_FORM()
{

    setWindowState(Qt::WindowMaximized);
    REGISTER_BUTTONS_WIDGET ( m_ui->navigation_button_widget );

    num_of_columns   = 11;

    REGISTER_TABLE_WIDGET             ( m_ui->tablewidget_tablo_satirlari, num_of_columns );
    SET_FIS_ORDER_COLUMN_NUMBER       ( ORDER_COLUMN );
    SET_FORM_ID_COLUMN_POSITION       ( TABLO_ID_COLUMN );
    SET_ROW_ID_COLUMN_POSITION        ( ROW_ID_COLUMN );
    SET_NUMBER_OF_HIDDEN_COLUMN       ( 3 );
    SET_FIS_ORDER_DATABASE            ( "sql_alanlar", "alan_order_num", "alan_id" );
    SET_COMMA_EDIT_PRECISION          ( ALAN_BOYUT_COLUMN, 0);
    SET_COMMA_EDIT_PRECISION          ( DIZI_BOYUT_COLUMN, 0);
    SET_FIRST_FOCUS_WIDGET            ( m_ui->lineEdit_tablo_adi );


    SET_TABLE_ROW_WIDGETS ( ALAN_TIPI_COLUMN      , WIDGET_COMBO_BOX  );
    SET_TABLE_ROW_WIDGETS ( DIZI_MI_COLUMN        , WIDGET_CHECK_BOX  );
    SET_TABLE_ROW_WIDGETS ( AUTO_INCREMENT_COLUMN , WIDGET_CHECK_BOX  );
    SET_TABLE_ROW_WIDGETS ( NOT_NULL_COLUMN       , WIDGET_CHECK_BOX  );
    SET_TABLE_ROW_WIDGETS ( ALAN_ADI_COLUMN       , WIDGET_LINE_EDIT  );
    SET_TABLE_ROW_WIDGETS ( ACIKLAMA_COLUMN       , WIDGET_LINE_EDIT  );
    SET_TABLE_ROW_WIDGETS ( ALAN_BOYUT_COLUMN     , WIDGET_COMMA_EDIT );
    SET_TABLE_ROW_WIDGETS ( DIZI_BOYUT_COLUMN     , WIDGET_COMMA_EDIT );

    m_ui->lineEdit_tablo_adi->setMaxLength                  ( 27  );
    m_ui->lineEdit_alan_adi->setMaxLength                   ( 30  ); // Oracle 30 hane ile sinirli
    m_ui->limitedTextEdit_aciklama->SET_MAX_STRING_LENGTH   ( 512 );

    SET_PAGE_TITLE        ( tr("SQL DESIGNER - TABLES"));

    REGISTER_SAVER_BUTTON ( m_ui->button_indexler );
    REGISTER_SAVER_BUTTON ( m_ui->button_header_olustur );

    m_ui->tablewidget_tablo_satirlari->setHorizontalHeaderLabels(QStringList()<<"alan_id"<<"tablo_id"
                                                                              <<"alan_order_num"
                                                                              <<tr("Field Name")<<tr("Field Type")
                                                                              <<tr("Length")<<tr("Is Array?")
                                                                              <<tr("Array Size")<<tr("Statement")
                                                                              <<tr("Auto Increment")<<tr("Not Null")
                                                                              <<tr("")<<tr(""));

    QHeaderView * header =  m_ui->tablewidget_tablo_satirlari->horizontalHeader();

     m_ui->tablewidget_tablo_satirlari->setColumnWidth ( ALAN_ADI_COLUMN       ,    300 );
     m_ui->tablewidget_tablo_satirlari->setColumnWidth ( ALAN_TIPI_COLUMN      ,    150 );
     m_ui->tablewidget_tablo_satirlari->setColumnWidth ( ALAN_BOYUT_COLUMN     ,    100 );
     m_ui->tablewidget_tablo_satirlari->setColumnWidth ( DIZI_MI_COLUMN        ,    75  );
     m_ui->tablewidget_tablo_satirlari->setColumnWidth ( DIZI_BOYUT_COLUMN     ,    100 );
     m_ui->tablewidget_tablo_satirlari->setColumnWidth ( ACIKLAMA_COLUMN       ,    446 );


    m_ui->tablewidget_tablo_satirlari->hideColumn ( AUTO_INCREMENT_COLUMN );
    m_ui->tablewidget_tablo_satirlari->hideColumn ( NOT_NULL_COLUMN       );

    header->setStretchLastSection(QHeaderView::Stretch);
    m_ui->tablewidget_tablo_satirlari->setSelectionMode ( QAbstractItemView::NoSelection );
    m_ui->tablewidget_tablo_satirlari->setFocus( Qt::OtherFocusReason );

    FOCUS_FIRST_WIDGET();
}