Exemplo n.º 1
0
void  BNK_VIRMAN_FORMU::NEW_RECORD ()
{

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

    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_fis_filtresi, K9_GET_FIS_FILTRESI_STRING( m_ent_filtresi_turu ));
}
Exemplo n.º 2
0
void ADRES_TELEFON_FISI::SET_LINE_DEFAULTS ( int p_row_number )
{
    QComboBox  * comboBox_ulke_kodu = ( QComboBox  * ) m_ui->tableWidget_telefonlar->cellWidget ( p_row_number, TEL_ULKE_KODU_COLUMN     );
    QComboBox  * comboBox_alan_kodu = ( QComboBox  * ) m_ui->tableWidget_telefonlar->cellWidget ( p_row_number, TEL_ALAN_KODU_COLUMN     );
    QLineEdit  * lineEdit_telefon   = ( QLineEdit  * ) m_ui->tableWidget_telefonlar->cellWidget ( p_row_number, TELEFON_COLUMN           );
    QCommaEdit * commaEdit_dahili   = ( QCommaEdit * ) m_ui->tableWidget_telefonlar->cellWidget ( p_row_number, IS_DAHILI_TELEFON_COLUMN );
    QLineEdit  * lineEdit_aciklama  = ( QLineEdit  * ) m_ui->tableWidget_telefonlar->cellWidget ( p_row_number, ACIKLAMA_COLUMN          );

    lineEdit_aciklama->setMaxLength(100);

    GET_ULKE_TELEFON_KODLARI( comboBox_ulke_kodu );

    QString turkiye_ulke_kodu = GET_ULKE_TELEFON_KODU( "Türkiye" );

    FIND_AND_SET_COMBOBOX_TEXT ( comboBox_ulke_kodu, turkiye_ulke_kodu );

    GET_ALAN_KODLARI           ( comboBox_alan_kodu );

    lineEdit_telefon->setInputMask  ("999-99-99");
    lineEdit_telefon->setCursorPosition(0);

    commaEdit_dahili->setMaxLength(5);
    commaEdit_dahili->SET_PRECISION(0);
    commaEdit_dahili->VIRGULSUZ_CALIS(true);
}
void PRS_MAAS_BORDROSU_RAPORU_BATCH::COMBO_BOX_BORDRO_YILI_DOLDUR ()
{
    PRS_FILL_COMBO_BOX_BORDRO_YILLARI( m_ui->combo_box_yillar );

    int current_month = QDate::currentDate().month();
    FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_aylar, K9_GET_AYLAR_STRING( current_month));
}
Exemplo n.º 4
0
void IMPORT_KERNEL::SETUP_FORM ()
{
    SET_NAME_OF_RUN_BATCH_BUTTON ( tr("Import") );

    SET_AUTO_EXIT_BATCH ( true );

    SET_FIRST_FOCUS_WIDGET ( m_ui->line_edit_dosya_path );
    REGISTER_BUTTON_WIDGET ( m_ui->widget_batch_buttons );

    SET_PAGE_TITLE    ( tr ( "IMPORT" ) );
    SET_SETTING_NAME  ("E9_AKTAR");

    SET_HELP_PAGE     ( m_help_page );

    m_kayitlar_onaylandi_mi = false;

    m_ui->line_edit_dosya_path->setDisabled (true);
    m_ui->line_edit_dosya_path->setMaxLength(250);

    m_ui->table_widget_onizleme->setObjectName("NO_EVENT_ON_WIDGET");
    m_ui->table_widget_kaydedilmisler->setObjectName("NO_EVENT_ON_WIDGET");
    m_ui->table_widget_kaydedilmisler->hide();
    m_ui->label_kaydedilmeyecek_veriler->hide();

    QList< QByteArray > available_coding_list = QTextCodec::availableCodecs() ;
    for( int i = 0 ; i < available_coding_list.size() ; ++i ){
        m_ui->comboBox_dosya_encoding->addItem( available_coding_list.at(i) );
    }

    FIND_AND_SET_COMBOBOX_TEXT(m_ui->comboBox_dosya_encoding, tr("UTF-8"));
}
Exemplo n.º 5
0
void MUH_TOPLU_FIS_RAPORU_BATCH::SETUP_FORM()
{
    SET_HELP_PAGE           (  "genel-muhasebe_toplu-fis-dokumu" );
    SET_PAGE_TITLE          ( tr ( "MUH - TOPLU FİŞ DÖKÜMÜ" ) );

    REGISTER_BUTTON_WIDGET ( m_ui->widget_batch_buttons );

    SET_SETTING_NAME        ( "MUH_TOPLU_FIS_RAPORU_BATCH" );

    m_ui->adakDate_bas_tarihi->SET_DATE( MALI_YIL_FIRST_DATE() );
    m_ui->adakDate_bitis_tarihi->SET_DATE( MALI_ARRAY_LAST_DATE() );

    SET_NAME_OF_RUN_BATCH_BUTTON ( "Rapor Al" );
    SET_FIRST_FOCUS_WIDGET       ( m_ui->adakDate_bas_tarihi );

    if( K9_KULLANICININ_CALISTIGI_SIRKET() EQ 1 ){
        m_ent_filtre_turu = FIS_BIRINCI_SIRKET;
    }
    else {
        m_ent_filtre_turu = FIS_HER_IKI_SIRKET;
    }

    K9_FILL_COMBOBOX_RAPOR_SIRKET_FILTRESI( m_ui->comboBox_sirket_turu );

    m_ui->comboBox_sirket_turu->setHidden(true );
    m_ui->label_sirket_turu->setHidden(true);

    if( K9_KULLANICI_SIRKET_DEGISTIRE_BILIR_MI() EQ EVET ){

        m_ui->comboBox_sirket_turu->setHidden(false);
        m_ui->label_sirket_turu->setHidden(false);
    }
    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_sirket_turu, K9_GET_RAPOR_SIRKET_FILTRESI_STRING(m_ent_filtre_turu ) );
}
Exemplo n.º 6
0
void ADRES_YETKILILER_FISI::SET_LINE_DEFAULTS ( int p_row_number )
{
    QComboBox   * comboBox_ulke_kodu            = ( QComboBox   * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, YETKILI_ULKE_KODU          );
    QComboBox   * comboBox_ev_alan              = ( QComboBox   * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, YETKILI_EV_TEL_ALAN_KODU   );
    QComboBox   * comboBox_gsm_kodu             = ( QComboBox   * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, YETKILI_GSM_KODU           );
    QComboBox   * comboBox_is_tel_kodu          = ( QComboBox   * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, YETKILI_IS_TEL_ALAN_KODU   );
    QLineEdit   * lineEdit_yetkili_ev_telefonu  = ( QLineEdit   * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, YETKILI_EV_TELEFONU        );
    QLineEdit   * lineEdit_yetkili_is_telefonu  = ( QLineEdit   * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, YETKILI_IS_TELEFONU        );
    QLineEdit   * lineEdit_yetkili_cep_telefonu = ( QLineEdit   * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, YETKILI_CEP_TELEFONU       );
    QLineEdit   * line_edit_ad_soyad            = ( QLineEdit  * ) m_ui->table_widget_yetkililer->cellWidget  ( p_row_number, YETKILI_ADI_SOYADI_COLUMN  );
    QLineEdit   * line_edit_gorevi              = ( QLineEdit  * ) m_ui->table_widget_yetkililer->cellWidget  ( p_row_number, YETKILI_GOREVI             );

    QPushButton * button_detaylar               = ( QPushButton * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, DETAYLAR_BUTTON_COLUMN     );
    QCommaEdit  * commaEdit_is_tel_dahili       = ( QCommaEdit  * ) m_ui->table_widget_yetkililer->cellWidget ( p_row_number, YETKILI_IS_TELEFONU_DAHILI );

    SET_COMBOBOX_LENGTH(comboBox_ulke_kodu     , 10 );
    SET_COMBOBOX_LENGTH(comboBox_ev_alan       , 10 );
    SET_COMBOBOX_LENGTH(comboBox_gsm_kodu      , 10 );
    SET_COMBOBOX_LENGTH(comboBox_is_tel_kodu   , 10 );

    lineEdit_yetkili_ev_telefonu->setMaxLength   ( 10 );
    lineEdit_yetkili_is_telefonu->setMaxLength   ( 10 );
    lineEdit_yetkili_cep_telefonu->setMaxLength  ( 10 );
    line_edit_gorevi->setMaxLength               ( 30 );
    line_edit_ad_soyad->setMaxLength             ( 100 );
    commaEdit_is_tel_dahili->setMaxLength        ( 5 );

    GET_ULKE_TELEFON_KODLARI( comboBox_ulke_kodu );

    QString turkiye_ulke_kodu = GET_ULKE_TELEFON_KODU( "Türkiye" );

    FIND_AND_SET_COMBOBOX_TEXT ( comboBox_ulke_kodu, turkiye_ulke_kodu );

    SATIR_TELEFON_ALAN_KODLARINI_DOLDUR ( p_row_number );

    lineEdit_yetkili_ev_telefonu->setInputMask  ( "999-99-99" );
    lineEdit_yetkili_is_telefonu->setInputMask  ( "999-99-99" );
    lineEdit_yetkili_cep_telefonu->setInputMask ( "999-99-99" );

    button_detaylar->setText       ( tr ( "Detaylar" ) );
    button_detaylar->setToolTip    ( tr ( "Yetkili detayları için tıklayınız." ) );

    commaEdit_is_tel_dahili->VIRGULSUZ_CALIS ();
    commaEdit_is_tel_dahili->SET_PRECISION   ( 0 );
    commaEdit_is_tel_dahili->SET_RETURN_EMPTY(true);

    REGISTER_LINE_SAVER_BUTTON     ( p_row_number, DETAYLAR_BUTTON_COLUMN );
}
void PRS_EBILDIRGE_OLUSTUR_BATCH::SETUP_FORM ()
{
    SET_PAGE_TITLE    ( tr ( "PRS - E-BİLDİRGE" ) );
    SET_HELP_PAGE     ( "personel-bordrosu_e-bildirge" );

    // Butonumuzun eklenecegi widgeti register ediyoruz.
    REGISTER_BUTTON_WIDGET ( m_ui->widget_batch_buttons );

    SET_NAME_OF_RUN_BATCH_BUTTON ( "E-Bildirge" );

    // Programa ilk girildiginde focuslanacak widget setlenmelidir.
    SET_FIRST_FOCUS_WIDGET ( m_ui->combo_box_aylar );

    E9_FILL_COMBOBOX_AYLAR( m_ui->combo_box_aylar );
    PRS_FILL_COMBO_BOX_BORDRO_YILLARI( m_ui->combo_box_yillar );
    PRS_FILL_COMBO_BOX_SUBE_SECIMI(m_ui->combo_box_subeler) ;

    int current_month = QDate::currentDate().month();
    FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_aylar, E9_GET_AYLAR_STRING( current_month));

    SET_SETTING_NAME  ("E-Bildirge");
}
Exemplo n.º 8
0
int PRS_PERSONEL_AILE_FISI::GET_FIS_RECORD ( int record_id )
{
    SQL_QUERY   sql_query_personel (DB);
    SQL_QUERY   query              (DB);


    int cari_hesap_id =  0 ;
    sql_query_personel.PREPARE_SELECT( "prs_personeller ","sicil_no, cari_hesap_id","personel_id = :personel_id" );

    sql_query_personel.SET_VALUE(":personel_id", record_id);

    if ( sql_query_personel.SELECT() NE 0 ) {

        sql_query_personel.NEXT();

        line_edit_personel_sicil_no->setText ( sql_query_personel.VALUE(0).toString() );
        cari_hesap_id     =   sql_query_personel.VALUE( 1 ).toInt();
    }

    CARI_HESAP_STRUCT hesap_bilgileri;
    CARI_SET_HESAP_STRUCT_DEFAULTS(&hesap_bilgileri);

    CARI_KART_BILGILERINI_OKU( cari_hesap_id, &hesap_bilgileri  );

    line_edit_personel_adi->setText         ( hesap_bilgileri.cari_hesap_ismi);

    query.PREPARE_SELECT ( "prs_personel_aile_uyeleri ",
                           "aile_bilgi_id , personel_id, order_number, aciklama, "
                           "adi_soyadi,  tc_kimlik_no,akrabalik_derecesi,dogum_tarihi, "
                           "ogrenim_durumu, calisma_durumu,"
                           "cinsiyet, asgari_gecim_ind_durumu ",
                           "personel_id = :personel_id ");

    query.SET_VALUE      ( ":personel_id",  record_id );

    if ( query.SELECT("order_number ASC" ) NE 0 ) {

        while ( query.NEXT() EQ true ) {

            int p_current_row;

            p_current_row = ADD_NEW_LINE ();

            QWidget    *   cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, AD_SOYAD_COLUMN );
            QLineEdit  *   line_edit_ad_soyad    = static_cast < QLineEdit * > ( cell_widget );
            line_edit_ad_soyad->setText( query.VALUE("adi_soyadi").toString() );

            cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, TC_KIMLIK_NO_COLUMN );
            QLineEdit  *   line_edit_tc_kimlik_no    = static_cast < QLineEdit * > ( cell_widget );
            line_edit_tc_kimlik_no->setText( query.VALUE("tc_kimlik_no").toString() );

            cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, AKRABALIK_DERECESI_COLUMN );
            QComboBox  *   combo_box_akrabalik_derecesi    = static_cast < QComboBox * > ( cell_widget );

            FIND_AND_SET_COMBOBOX_TEXT(combo_box_akrabalik_derecesi ,
                                       PRS_GET_AKRABALIK_DERECESI_STRING(query.VALUE("akrabalik_derecesi").toInt()));

            cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, CALISMA_DURUMU_COLUMN );
            QComboBox  *   combo_box_calisma_durumu    = static_cast < QComboBox * > ( cell_widget );

            FIND_AND_SET_COMBOBOX_TEXT(combo_box_calisma_durumu , PRS_GET_CALISMA_DURUMU_STRING(query.VALUE("calisma_durumu").toInt()));

            cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, DOGUM_TARIHI_COLUMN);
            QAdakDate * adakDate_dogum_tarihi = static_cast<QAdakDate*> (cell_widget);
            adakDate_dogum_tarihi->SET_DATE( query.VALUE("dogum_tarihi").toString());

            cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, EGITIM_DURUMU_COLUMN );
            QComboBox  *   combo_box_egitim_durumu    = static_cast < QComboBox * > ( cell_widget );

            FIND_AND_SET_COMBOBOX_TEXT(combo_box_egitim_durumu , query.VALUE("ogrenim_durumu").toString());

            cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, CINSIYET_COLUMN );
            QComboBox  *   combo_box_cinsiyet    = static_cast < QComboBox * > ( cell_widget );

            FIND_AND_SET_COMBOBOX_TEXT(combo_box_cinsiyet , query.VALUE("cinsiyet").toString());

            cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, ACIKLAMA_COLUMN );
            QLineEdit  *   line_edit_aciklama    = static_cast < QLineEdit * > ( cell_widget );
            line_edit_aciklama->setText( query.VALUE("aciklama").toString() );

            cell_widget = table_widget_aile_satirlari->cellWidget( p_current_row, ASGARI_GECIM_IND_DURUMU_COLUMN );
            QComboBox  *   combo_box_asagari_gecim_ind_durumu  = static_cast < QComboBox * > ( cell_widget );

            int asgari_gecim_ind_durumu = query.VALUE( "asgari_gecim_ind_durumu" ).toInt();

            FIND_AND_SET_COMBOBOX_TEXT( combo_box_asagari_gecim_ind_durumu , PRS_GET_EVET_HAYIR_DURUMU_STRING(asgari_gecim_ind_durumu));


            QString id                      = query.VALUE("aile_bilgi_id").toString();
            QString personel_id             = query.VALUE("personel_id").toString();
            QString order_number            = query.VALUE("order_number").toString();


            QTableWidgetItem * new_item;

            table_widget_aile_satirlari->setHorizontalHeaderLabels(QStringList()<<"id"<<"record_id"<<"satir_order"
                                                                    <<tr("Ad Soyad")<<tr("TC Kimlik No")<<tr("Akrabalık Derecesi")<<("Çalışma Durumu")
                                                                    <<tr("Doğum Tarihi")<<tr("Eğitim Düzeyi")
                                                                    <<tr("Cinsiyet")<< tr("Asgari Geçim \n İndirimi") << tr("Açıklama")<<tr("")<<tr("") );

            new_item = new QTableWidgetItem(tr("%1").arg(id));
            table_widget_aile_satirlari->setItem(p_current_row, ROW_ID_COLUMN, new_item);

            new_item = new QTableWidgetItem(tr("%1").arg(personel_id));
            table_widget_aile_satirlari->setItem(p_current_row, RECORD_ID_COLUMN, new_item);

            new_item = new QTableWidgetItem(tr("%1").arg(order_number));
            table_widget_aile_satirlari->setItem(p_current_row, ORDER_COLUMN, new_item);

        }
    }
    return ADAK_OK;
}
Exemplo n.º 9
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 );

}
Exemplo n.º 10
0
void MUH_HESAP_EKSTRESI_BATCH::SETUP_FORM()
{
    SET_HELP_PAGE( "genel-muhasebe_hesap-ekstresi-muavin" );
    SET_PAGE_TITLE( tr ( "MUH - HESAP EKSTRESİ ( MUAVİN )" ) );

    REGISTER_BUTTON_WIDGET( m_ui->widget_batch_buttons );

    SET_SETTING_NAME( "MUH_HESAP_EKSTRESI_BATCH" );

    SET_NAME_OF_RUN_BATCH_BUTTON( tr ( "Rapor Al" ) );
    SET_ENTER_KEY_FOR_RUN_BATCH( true );

    m_ui->adakDate_baslangic_tarihi->SET_DATE( MALI_YIL_FIRST_DATE() );
    m_ui->adakDate_bitis_tarihi->SET_DATE( MALI_ARRAY_LAST_DATE() );

    m_ui->frame_sadece_ana_hesaplari_goster->setDisabled ( true );

    if ( E9_KULLANICI_SIRKET_DEGISTIRE_BILIR_MI() EQ EVET ) {
        m_ui->comboBox_sirket_turu->setVisible(true);
        m_ui->label_sirket_turu->setVisible(true);
        m_ui->frame_sirket->setVisible(true);
    }

    if (m_secili_hesap.isEmpty() EQ false) {
        m_ui->frame_tek_hesap->setEnabled(true);
        m_ui->checkbox_tek_hesap->setChecked(true);
        m_ui->frame_hesap_araligi->setEnabled(false);
        m_ui->checkbox_hesap_araligi->setChecked(false);
        m_ui->search_edit_tek_hesap_kodu->SET_TEXT(m_secili_hesap);
        SQL_QUERY query ( DB );

        query.PREPARE_SELECT("muh_hesaplar" , "hesap_ismi" , "tam_hesap_kodu = :tam_hesap_kodu");

        query.SET_VALUE      ( ":tam_hesap_kodu" , m_secili_hesap );

        if ( query.SELECT() EQ 0 ) {
            m_ui->search_edit_tek_hesap_kodu->SET_TEXT("");
        }
        else {
            query.NEXT();
            m_ui->lineedit_tek_hesap_ismi->setText(query.VALUE(0).toString());
        }
    }

    m_ui->checkbox_hesap_araligi->setChecked( false );
    m_ui->frame_hesap_araligi->setEnabled( false );

    m_ui->checkbox_tek_hesap->setChecked( true );
    // tum bakiler tek hesapta bunlar degıstırılmez
    m_ui->frame_bakiyesiz_hesaplar->setEnabled( false );
    m_ui->frame_calismamis_hesaplar->setEnabled( false );

    FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_bakiye, "Tüm Hesaplar");
    FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_islem, "Tüm Hesaplar");

    SQL_QUERY sql_query ( DB );

    sql_query.PREPARE_SELECT("e9_kullanici_yetkileri" , "hesap_ekstresi_nakli_yekun" ,
                             "kullanici_id = :kullanici_id");
    sql_query.SET_VALUE(":kullanici_id" , KULLANICI_ID());

    int nakli_yekun = 1;

    if ( sql_query.SELECT() NE 0 ) {
        sql_query.NEXT();

        nakli_yekun = sql_query.VALUE(0).toInt();
    }

    m_ui->checkbox_nakli_yekun->setChecked(QVariant(nakli_yekun).toBool());

    if ( m_rapor_turu NE ENUM_MUH_HESAP_EKSTRESI ) {

        m_ui->checkbox_nakli_yekun->setChecked(true);
        m_ui->frame_bakiyesiz_hesaplar->setHidden(true);
        m_ui->frame_calismamis_hesaplar->setHidden(true);
        m_ui->frame_hesap_araligi->setHidden(true);
        m_ui->frame_nakli_yekun->setHidden(true);
        m_ui->frame_sadece_ana_hesaplari_goster->setHidden(true);
        m_ui->frame_tek_hesap->setHidden(true);

        m_ui->checkbox_ana_hesaplar->setHidden(true);
        m_ui->checkbox_hesap_araligi->setHidden(true);
        m_ui->checkbox_nakli_yekun->setHidden(true);
        m_ui->checkbox_tarih_araligi->setHidden(true);
        m_ui->checkbox_tek_hesap->setHidden(true);

        SET_PAGE_TITLE(QObject::tr( "KASA RAPORU" ) );
        SET_HELP_PAGE( "kasa-perakende_kasa-raporu" );

        if ( E9_KULLANICI_ENT_BILGILERINI_DEGISTIREBILIR_MI() EQ 1 ) {
            m_ui->checkbox_tek_hesap->setHidden(false);
            m_ui->frame_tek_hesap->setHidden(false);
        }
    }

    SET_FIRST_FOCUS_WIDGET(m_ui->search_edit_tek_hesap_kodu);

    FOCUS_FIRST_WIDGET();
}
Exemplo n.º 11
0
int ADRES_TELEFON_FISI::GET_FIS_RECORD ( int p_adres_id )
{
    SQL_QUERY sql_query ( DB );

    sql_query.PREPARE_SELECT ( "adr_adresler","firma_sahis_adi,adres_kart_turu","adres_id = :adres_id" );
    sql_query.SET_VALUE      ( ":adres_id", p_adres_id );

    if ( sql_query.SELECT() EQ 0 ) {
        return ADAK_FAIL;
    }

    sql_query.NEXT();

    m_ui->label_firma_sahis_adi->setText ( sql_query.VALUE(0).toString());

    if (sql_query.VALUE(1) EQ FIRMA_KAYDI ) {
        m_ui->tableWidget_telefonlar->hideColumn ( IS_DAHILI_TELEFON_COLUMN );
    }

    sql_query.PREPARE_SELECT ( "adr_telefonlar","telefon_id, order_number, telefon_ulke_kodu, telefon_alan_kodu, "
                               "telefon, telefon_dahili,aciklama ","adres_kayit_id = :adres_kayit_id AND gizli_kayit = :gizli_kayit ");

    sql_query.SET_VALUE ( ":adres_kayit_id", p_adres_id );
    sql_query.SET_VALUE ( ":gizli_kayit"   , 0);

    if ( sql_query.SELECT("order_number") EQ 0 ) {
        return ADAK_OK;
    }

    int current_row = 0;

    while ( sql_query.NEXT() EQ true ) {

        current_row = ADD_NEW_LINE ();

        QComboBox        * comboBox_ulke_kodu = ( QComboBox  * ) m_ui->tableWidget_telefonlar->cellWidget ( current_row, TEL_ULKE_KODU_COLUMN     );
        QComboBox        * comboBox_alan_kodu = ( QComboBox  * ) m_ui->tableWidget_telefonlar->cellWidget ( current_row, TEL_ALAN_KODU_COLUMN     );
        QLineEdit        * lineEdit_telefon   = ( QLineEdit  * ) m_ui->tableWidget_telefonlar->cellWidget ( current_row, TELEFON_COLUMN           );
        QCommaEdit       * commaEdit_dahili   = ( QCommaEdit * ) m_ui->tableWidget_telefonlar->cellWidget ( current_row, IS_DAHILI_TELEFON_COLUMN );
        QLineEdit        * lineEdit_aciklama  = ( QLineEdit  * ) m_ui->tableWidget_telefonlar->cellWidget ( current_row, ACIKLAMA_COLUMN          );

        QTableWidgetItem * telefon_id_item    = new QTableWidgetItem ( sql_query.VALUE(0).toString()      );
        QTableWidgetItem * adres_id_item      = new QTableWidgetItem ( QVariant ( p_adres_id ).toString() );
        QTableWidgetItem * telefon_order_item = new QTableWidgetItem ( sql_query.VALUE(1).toString()      );

        FIND_AND_SET_COMBOBOX_TEXT ( comboBox_ulke_kodu, sql_query.VALUE(2).toString() );

        GET_ALAN_KODLARI           ( comboBox_alan_kodu, comboBox_ulke_kodu->currentText() );
        FIND_AND_SET_COMBOBOX_TEXT ( comboBox_alan_kodu, sql_query.VALUE(3).toString() );

        lineEdit_telefon->setText ( sql_query.VALUE(4).toString() );

        commaEdit_dahili->SET_INTEGER ( sql_query.VALUE(5).toInt() );
        lineEdit_aciklama->setText(sql_query.VALUE(6).toString());

        m_ui->tableWidget_telefonlar->setItem ( current_row, TELEFON_ID_COLUMN, telefon_id_item    );
        m_ui->tableWidget_telefonlar->setItem ( current_row, KAYIT_ID_COLUMN,   adres_id_item      );
        m_ui->tableWidget_telefonlar->setItem ( current_row, TELEFON_ORDER_NUM, telefon_order_item );
    }

    return ADAK_OK;
}
Exemplo n.º 12
0
int BNK_VIRMAN_FORMU::GET_RECORD ( int record_id )
{

    SQL_QUERY query( DB );
    query.PREPARE_SELECT( "bnk_virman_fisler","fis_no, fis_tarihi , kaydedilecek_sirket, aciklama","fis_id =:fis_id" );
    query.SET_VALUE     ( ":fis_id", record_id );

    if ( query.SELECT() EQ 0 ) {
        return ADAK_FAIL;
    }

    query.NEXT();

    m_ui->lineEdit_fis_no->setText  ( QVariant ( query.VALUE( 0 ).toInt() ).toString() );
    m_ui->adakDate_tarih->SET_DATE(  query.VALUE( 1 ).toString());
    int   kaydedilecek_sirket  = query.VALUE( 2 ).toInt();
    m_ui->limitedTextEdit_aciklama->insertPlainText( query.VALUE( 3 ).toString() );

    query.PREPARE_SELECT( "bnk_virman_fis_satirlari","gonderen_hesap_no_id, alici_hesap_no_id, "
                          "doviz_kuru, gonderen_islem_tutari, alici_islem_tutari, doviz_kuru",
                          "fis_id =:fis_id" );
    query.SET_VALUE     ( ":fis_id", record_id );

    if ( query.SELECT() NE 0 ) {

        query.NEXT();

        m_gonderen_hesap_no_id  = query.VALUE( 0 ).toInt();
        m_alici_hesap_no_id     = query.VALUE( 1 ).toInt();

        m_ui->commaEdit_kur->SET_DOUBLE           ( query.VALUE( 2 ).toDouble() );
        m_ui->commaEdit_gonderen_tutar->SET_DOUBLE( query.VALUE( 3 ).toDouble() );
        m_ui->commaEdit_alan_tutar->SET_DOUBLE    ( query.VALUE( 4 ).toDouble() );
        m_ui->commaEdit_kur->SET_DOUBLE           ( query.VALUE( 5 ).toDouble() );
    }

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

    // gonderen banka
    int row = BNK_HESAPLARI_MODEL_INDEX_BUL ( m_gonderen_hesap_no_id, m_ui->comboBox_gonderen_hesap );

    if ( row > -1 ) {

        m_ui->comboBox_gonderen_hesap->setCurrentIndex ( row );

        m_gonderen_hesap_no_id    = BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_gonderen_hesap, row, 0 ).toInt();
        m_gon_hesabi_doviz_id   = BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_gonderen_hesap, row, 1 ).toInt();

        m_ui->lineEdit_gonderen_hesap_doviz_kodu->setText ( DVZ_GET_DOVIZ_KODU ( m_gon_hesabi_doviz_id ) );
        m_ui->lineEdit_gonderenin_birim->setText          ( DVZ_GET_DOVIZ_KODU ( m_gon_hesabi_doviz_id ) );

        QString banka_bilgisi = BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_gonderen_hesap, row, 3 ).toString() + " / " +
                                BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_gonderen_hesap, row, 4 ).toString() + " " +
                                BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_gonderen_hesap, row, 5 ).toString() + " " +
                                BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_gonderen_hesap, row, 6 ).toString();

        m_ui->lineEdit_gonderen_hesap_adi->setText ( banka_bilgisi );

    }

    // alici banka
    row = BNK_HESAPLARI_MODEL_INDEX_BUL ( m_alici_hesap_no_id, m_ui->comboBox_alici_hesap );

    if ( row > -1 ) {

        m_ui->comboBox_alici_hesap->setCurrentIndex ( row );

        m_alici_hesap_no_id       = BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL( m_ui->comboBox_alici_hesap, row, 0 ).toInt();
        m_alici_hesabi_doviz_id   = BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL( m_ui->comboBox_alici_hesap, row, 1 ).toInt();

        m_ui->lineEdit_alici_hesap_doviz_kodu->setText ( DVZ_GET_DOVIZ_KODU ( m_alici_hesabi_doviz_id ) );
        m_ui->lineEdit_alanin_birimi->setText( DVZ_GET_DOVIZ_KODU ( m_alici_hesabi_doviz_id ) );

        QString banka_bilgisi = BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_alici_hesap, row, 3 ).toString() + " / " +
                                BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_alici_hesap, row, 4 ).toString() + " " +
                                BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_alici_hesap, row, 5 ).toString() + " " +
                                BNK_GET_DATA_FROM_BNK_HESAPLARI_MODEL ( m_ui->comboBox_alici_hesap, row, 6 ).toString();

        m_ui->lineEdit_alici_hesap_adi->setText ( banka_bilgisi );
    }

    if ( m_gon_hesabi_doviz_id NE m_alici_hesabi_doviz_id ) {
        if( m_gon_hesabi_doviz_id EQ DVZ_GET_TEMEL_PARA_BIRIMI_ID() ) {
        }
        else if( m_alici_hesabi_doviz_id EQ DVZ_GET_TEMEL_PARA_BIRIMI_ID() ) {
        }
        else {
            m_ui->commaEdit_kur->setVisible( true );
        }
    }
    else {
        m_ui->commaEdit_alan_tutar->setEnabled( false );
        if ( m_gon_hesabi_doviz_id EQ DVZ_GET_TEMEL_PARA_BIRIMI_ID() ) {
        }
        else {
            m_ui->commaEdit_kur->setVisible( true );
        }
    }
    return ADAK_OK;

}
Exemplo n.º 13
0
int SMM_MAKBUZ_FORMU::GET_RECORD ( int record_id )
{
    m_ui->label_tevkifat_tutari->setHidden(true);
    m_ui->commaEdit_tevkifat_tutari->setHidden(true);

    SMM_MAKBUZ_BILGILERINI_OKU( M_MAKBUZ , record_id);

    m_ui->lineEdit_smmm_no->setText(QVariant(M_MAKBUZ->makbuz_no).toString());
    m_ui->adakDate_fis_tarihi->SET_DATE(M_MAKBUZ->makbuz_tarihi);
    m_ui->limitedTextEdit_aciklama->setPlainText(M_MAKBUZ->aciklama);

    m_cari_hesap_id = M_MAKBUZ->cari_hesap_id;

    m_ui->limitedTextEdit_adres->setPlainText(M_MAKBUZ->cari_hesap_adresi);

    FIND_AND_SET_COMBOBOX_TEXT(m_ui->comboBox_vergi_dairesi , M_MAKBUZ->vergi_dairesi);

    m_ui->lineEdit_vergi_numarasi->setText(M_MAKBUZ->vergi_numarasi);

    m_ui->lineEdit_sm_sicil_numarasi->setText(M_MAKBUZ->sm_sicil_numarasi);



    if ( M_MAKBUZ->tevkifat_tutari > 0 ) {
        m_ui->commaEdit_tevkifat_tutari->setHidden(false);
        m_ui->label_tevkifat_tutari->setHidden(false);
        m_ui->commaEdit_tevkifat_tutari->SET_DOUBLE(M_MAKBUZ->tevkifat_tutari);
    }

    m_ui->comboBox_kdv_orani->setCurrentIndex(m_ui->comboBox_kdv_orani->findText(QVariant(M_MAKBUZ->kdv_orani).toString()));

    m_ui->commaEdit_vergi_orani->SET_DOUBLE(M_MAKBUZ->vergi_orani);

    QString cari_hesap_kodu, cari_hesap_ismi;
    int     cari_para_birim_id;

    int result = CARI_GET_HESAP_KODU_ISMI_PARA_BIRIM_ID( m_cari_hesap_id, &cari_hesap_kodu, &cari_hesap_ismi, &cari_para_birim_id );

    m_sm_sicil_numarasi = CARI_GET_SM_SICIL_NUMARASI( m_cari_hesap_id );

    if ( result NE 0 ) {
        m_ui->searchEdit_cari_hesap_kodu->SET_TEXT( cari_hesap_kodu );
        m_ui->lineEdit_cari_hesap_ismi->setText( cari_hesap_ismi );
        m_ui->lineEdit_cari_para_birimi->setText(DVZ_GET_DOVIZ_KODU( cari_para_birim_id ));
    }

    M_ENT_DETAYLARI->muh_kasa_hesap_id    = M_MAKBUZ->muh_kasa_hesap_id;
    M_ENT_DETAYLARI->tevkifatli_mi        = M_MAKBUZ->tevkifatli_mi;
    M_ENT_DETAYLARI->tevkifat_yuzdesi     = M_MAKBUZ->tevkifat_yuzdesi;
    M_ENT_DETAYLARI->kaydedilecek_sirket           = M_MAKBUZ->kaydedilecek_sirket;
    M_ENT_DETAYLARI->tahsil_edildi_odendi = M_MAKBUZ->tahsil_edildi_odendi;

    m_makbuz_turu                = M_MAKBUZ->makbuz_turu;
    M_ENT_DETAYLARI->fis_turu  = m_makbuz_turu;

    m_ui->lineEdit_belge_seri->setText(M_MAKBUZ->belge_seri);
    m_ui->lineEdit_belge_numarasi->setText(M_MAKBUZ->belge_numarasi);

    m_ui->comboBox_tah_odm_sekli->setCurrentIndex(m_ui->comboBox_tah_odm_sekli->findText(K9_GET_TAH_ODM_SEKLI_STRING(M_MAKBUZ->tah_odm_sekli)));

    m_ui->label_banka_hesap_kodu->setHidden(true);
    m_ui->lineEdit_bnk_sube_bilgisi->setHidden(true);
    m_ui->comboBox_banka_hesap_kodu->setHidden(true);
    m_ui->lineEdit_doviz_cinsi->setHidden(true);
    m_ui->label_kk_pos_no->setHidden(true);
    m_ui->searchEdit_kk_pos_no->setHidden(true);

    if ( M_MAKBUZ->tah_odm_sekli EQ ENUM_KREDI_KARTI ) {
        m_ui->label_kk_pos_no->setHidden(false);
        m_ui->searchEdit_kk_pos_no->setHidden(false);

        if ( m_makbuz_turu EQ SMM_ALIS_MAKBUZU ) {
            m_ui->label_kk_pos_no->setText("Kredi Kartı Numarası");
            m_ui->searchEdit_kk_pos_no->SET_TEXT(BNK_GET_KREDI_KARTI_NUMARASI(M_MAKBUZ->kredi_karti_id));
            m_kredi_karti_id = M_MAKBUZ->kredi_karti_id;
        }
        else {
            m_ui->label_kk_pos_no->setText("Pos Numarası");
            m_ui->searchEdit_kk_pos_no->SET_TEXT(BNK_GET_POS_NUMARASI(M_MAKBUZ->pos_id));
            m_pos_id = M_MAKBUZ->pos_id;
        }

    }
    else if ( M_MAKBUZ->tah_odm_sekli EQ ENUM_HAVALE OR
             M_MAKBUZ->tah_odm_sekli EQ ENUM_EFT ) {
        m_ui->label_banka_hesap_kodu->setHidden(false);
        m_ui->lineEdit_bnk_sube_bilgisi->setHidden(false);
        m_ui->comboBox_banka_hesap_kodu->setHidden(false);
        m_ui->lineEdit_doviz_cinsi->setHidden(false);

        BNK_BANKA_BILGILERI_STRUCT * BANKA_INFO = new BNK_BANKA_BILGILERI_STRUCT;

        BNK_GET_BANKA_TEMEL_BILGILER(BANKA_INFO , M_MAKBUZ->hesap_no_id);

        m_ui->comboBox_banka_hesap_kodu->setCurrentIndex(m_ui->comboBox_banka_hesap_kodu->findText(BANKA_INFO->banka_hesap_kodu));

        QString banka_bilgisi = BANKA_INFO->banka_ismi +" / " + BANKA_INFO->sube_kodu +
                " " + BANKA_INFO->sube_ismi + " " + BANKA_INFO->hesap_numarasi;

        m_ui->lineEdit_bnk_sube_bilgisi->setText(banka_bilgisi);

        m_ui->lineEdit_doviz_cinsi->setText(DVZ_GET_DOVIZ_KODU(BANKA_INFO->doviz_id));

        m_hesap_no_id = M_MAKBUZ->hesap_no_id;
    }

    SQL_QUERY query(DB);

    query.PREPARE_SELECT("smm_makbuzlar,smm_hizmetler","hizmet_adi" ,"smm_hizmetler.hizmet_id = :hizmet_id "
                         "AND smm_makbuzlar.hizmet_id = smm_hizmetler.hizmet_id");
    query.SET_VALUE(":hizmet_id" , M_MAKBUZ->hizmet_id);

    if ( query.SELECT() NE 0 ) {
        query.NEXT();

        m_ui->comboBox_hizmet_turu->setCurrentIndex(m_ui->comboBox_hizmet_turu->findText(query.VALUE(0).toString()));
    }

    m_ui->commaEdit_kdv_tutari->SET_DOUBLE(M_MAKBUZ->kdv_tutari);
    m_ui->commaEdit_vergi_stopaj_tutari->SET_DOUBLE(M_MAKBUZ->vergi_stopaj_tutari);
    m_ui->commaEdit_hizmet_tutari->SET_DOUBLE(M_MAKBUZ->hizmet_tutari);
    m_ui->commaEdit_net_ucret->SET_DOUBLE(M_MAKBUZ->net_tutar);
    m_ui->commaEdit_brut_ucret->SET_DOUBLE(M_MAKBUZ->brut_tutar);

    return ADAK_OK;

}
Exemplo n.º 14
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 );
}
Exemplo n.º 15
0
void FAT_FATURA_ARAMA::SETUP_FORM()
{
    SET_HELP_PAGE  ("fatura_arama.html");
    SET_PAGE_TITLE ( tr ( "FATURA ARAMA" ) );

    //m_ui->frame_entegre_filtresi->setVisible( false );
    m_ui->groupBox_entegre_filtresi->setVisible( false );

    m_ui->frame_fatura_turu->setEnabled( false );
    m_ui->frame_acik_kapali_fatura->setEnabled( false );

    K9_FILL_COMBOBOX_FIS_FILTRESI( m_ui->comboBox_fis_filtresi );

    FAT_FILL_COMBOBOX_FATURA_TURU( m_ui->comboBox_fatura_turu, m_fatura_alis_satis_turu, -1 , m_iade_faturasi_mi );

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

    if ( K9_KULLANICININ_CALISTIGI_SIRKET() EQ 1 ) {
        m_entegre_filtresi_turu = FIS_BIRINCI_SIRKET;
    }
    else {
        m_entegre_filtresi_turu = FIS_HER_IKI_SIRKET;
    }

    if ( K9_KULLANICI_ENT_BILGILERINI_DEGISTIREBILIR_MI() EQ 1 ) {

        //m_ui->frame_entegre_filtresi->setVisible( true );
        m_ui->groupBox_entegre_filtresi->setVisible( false );
        m_entegre_filtresi_turu = FIS_HER_IKI_SIRKET;
    }

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

    FAT_FILL_ACIK_KAPALI_COMBO_BOX( m_ui->comboBox_acik_kapali_fatura );

    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_acik_kapali_fatura, FAT_GET_ACIK_KAPALI_FATURA_STRING( ENUM_TUM_FATURALAR ));

    m_ui->commaEdit_min_tutar->SET_PRECISION( 2 );
    m_ui->commaEdit_min_tutar->SET_RETURN_EMPTY( false );
    m_ui->commaEdit_max_tutar->SET_PRECISION( 2 );
    m_ui->commaEdit_max_tutar->SET_RETURN_EMPTY( false );

    m_ui->checkBox_tarih_araligi->setChecked        ( true  );
    m_ui->groupBox_tarih_araligi->setEnabled        ( true  );
    m_ui->groupBox_aciklama_icerigi->setEnabled     ( false );
    m_ui->groupBox_cari_hesap_kodu->setEnabled      ( false );
    m_ui->groupBox_urun->setEnabled                 ( false );
    m_ui->groupBox_tutar_araligi->setEnabled        ( false );

    m_ui->adakDate_ilk_tarih->SET_DATE( QDate::currentDate().addDays( -7 ) );
    m_ui->adakDate_son_tarih->SET_DATE( QDate::currentDate() );

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

    SET_HEADERS ( QStringList() <<tr("Fatura Id")<<tr("Fatura Tarihi")<<tr("Fiş No")<<tr("Cari Hesap") << tr("Fatura Seri / No")<< tr("Fatura Tutarı"));

    SET_SORTING ( false );

    SET_FIRST_FOCUS_WIDGET ( m_ui->adakDate_ilk_tarih );

    m_ui->tableWidget->setColumnWidth ( FATURA_TARIHI_COLUMN,  120 );
    m_ui->tableWidget->setColumnWidth ( FIS_NO_COLUMN,         60  );
    m_ui->tableWidget->setColumnWidth ( CARI_HESAP_COLUMN,     200 );
    m_ui->tableWidget->setColumnWidth ( FATURA_SERI_NO_COLUMN, 120 );
    m_ui->tableWidget->setColumnWidth ( FATURA_TUTARI_COLUMN,  120 );

    m_ui->tableWidget->hideColumn ( FIS_ID_COLUMN );

    SET_ENTER_KEY_FOR_RUN_BATCH ( true );
    SET_FIND_BUTTON_NAME        ( tr ( "Fatura Bul" ) );
    SET_SETTING_NAME            ( "FATURA_ARAMA" );
}
Exemplo n.º 16
0
int MUH_HESAP_EKSTRESI_BATCH::CHECK_VAR ( QObject * object )
{
    SQL_QUERY sql_query ( DB );

    if ( object EQ m_ui->search_edit_bas_hesap_kodu OR
              object EQ m_ui->search_edit_bts_hesap_kodu OR
              object EQ m_ui->search_edit_tek_hesap_kodu ) {

        QString tam_hesap_kodu;

        if ( object EQ m_ui->search_edit_bas_hesap_kodu ) {
            if ( m_ui->search_edit_bas_hesap_kodu->GET_TEXT().isEmpty() EQ true ) {
                m_ui->lineedit_bas_hesap_ismi->clear();
                return ADAK_OK;
            }
            tam_hesap_kodu = m_ui->search_edit_bas_hesap_kodu->GET_TEXT();
        }
        else if ( object EQ m_ui->search_edit_bts_hesap_kodu ) {
            if ( m_ui->search_edit_bts_hesap_kodu->GET_TEXT().isEmpty() EQ true ) {
                m_ui->lineedit_bts_hesap_ismi->clear();
                return ADAK_OK;
            }
            tam_hesap_kodu = m_ui->search_edit_bts_hesap_kodu->GET_TEXT();
        }
        else {
            if ( m_ui->search_edit_tek_hesap_kodu->GET_TEXT().isEmpty() EQ true ) {
                m_ui->lineedit_tek_hesap_ismi->clear();
                return ADAK_OK;
            }
            tam_hesap_kodu = m_ui->search_edit_tek_hesap_kodu->GET_TEXT();
        }
        sql_query.PREPARE_SELECT("muh_hesaplar" , "hesap_ismi" , "tam_hesap_kodu = :tam_hesap_kodu");

        sql_query.SET_VALUE      ( ":tam_hesap_kodu" , tam_hesap_kodu );

        if ( sql_query.SELECT() EQ 0 ) {
            MSG_WARNING( tr ( "Hesap bulunamadı!.." ), m_ui->search_edit_tek_hesap_kodu );

            return ADAK_FAIL_UNDO;
        }

        sql_query.NEXT();

        if ( object EQ m_ui->search_edit_bas_hesap_kodu ) {
            m_ui->lineedit_bas_hesap_ismi->setText ( sql_query.VALUE(0).toString() );
        }
        else if ( object EQ m_ui->search_edit_bts_hesap_kodu ) {
            m_ui->lineedit_bts_hesap_ismi->setText ( sql_query.VALUE(0).toString() );
        }
        else {
            m_ui->lineedit_tek_hesap_ismi->setText ( sql_query.VALUE(0).toString() );
        }
    }
    else if ( object EQ m_ui->checkbox_tek_hesap ) {

        if ( m_ui->checkbox_tek_hesap->isChecked() EQ false ) {
            m_ui->search_edit_tek_hesap_kodu->SET_TEXT ( "" );
            m_ui->lineedit_tek_hesap_ismi->clear();
            m_ui->frame_tek_hesap->setDisabled ( true );

            m_ui->checkbox_hesap_araligi->setCheckState ( Qt::Checked );
            m_ui->frame_hesap_araligi->setEnabled ( true );
            SET_FOCUS( m_ui->search_edit_tek_hesap_kodu );
            SET_FOCUS(m_ui->search_edit_bas_hesap_kodu);

            // tum bakiler tek hesapta bunlar degıstırılmez
            m_ui->frame_bakiyesiz_hesaplar->setEnabled( true );
            m_ui->frame_calismamis_hesaplar->setEnabled( true );

            FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_bakiye, "Bakiyeli");
            FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_islem, "Çalışmış");
        }
        else {
            m_ui->frame_tek_hesap->setEnabled ( true );
            SET_FOCUS(m_ui->search_edit_tek_hesap_kodu);

            m_ui->checkbox_hesap_araligi->setCheckState ( Qt::Unchecked );
            m_ui->search_edit_bas_hesap_kodu->SET_TEXT ( "" );
            m_ui->search_edit_bts_hesap_kodu->SET_TEXT ( "" );
            m_ui->lineedit_bas_hesap_ismi->clear();
            m_ui->lineedit_bts_hesap_ismi->clear();
            m_ui->frame_hesap_araligi->setDisabled ( true );

            // tum bakiler tek hesapta bunlar degıstırılmez
            m_ui->frame_bakiyesiz_hesaplar->setEnabled( false );
            m_ui->frame_calismamis_hesaplar->setEnabled( false );

            FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_bakiye, "Tüm Hesaplar");
            FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_islem, "Tüm Hesaplar");
        }
    }
    else if ( object EQ m_ui->checkbox_hesap_araligi ) {

        if ( m_ui->checkbox_hesap_araligi->isChecked() EQ false ) {

            m_ui->search_edit_bas_hesap_kodu->SET_TEXT ( "" );
            m_ui->search_edit_bts_hesap_kodu->SET_TEXT ( "" );
            m_ui->lineedit_bas_hesap_ismi->clear();
            m_ui->lineedit_bts_hesap_ismi->clear();
            m_ui->frame_hesap_araligi->setDisabled ( true );

            m_ui->frame_tek_hesap->setEnabled ( true );
            SET_FOCUS(m_ui->search_edit_tek_hesap_kodu);
            m_ui->checkbox_tek_hesap->setCheckState ( Qt::Checked );
            SET_FOCUS( m_ui->search_edit_bas_hesap_kodu );

            // tum bakiler tek hesapta bunlar degıstırılmez
            m_ui->frame_bakiyesiz_hesaplar->setEnabled( false );
            m_ui->frame_calismamis_hesaplar->setEnabled( false );

            FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_bakiye, "Tüm Hesaplar");
            FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_islem, "Tüm Hesaplar");

        }
        else {
            m_ui->frame_hesap_araligi->setEnabled ( true );

            SET_FOCUS(m_ui->search_edit_bas_hesap_kodu);
            m_ui->checkbox_tek_hesap->setCheckState ( Qt::Unchecked );
            m_ui->search_edit_tek_hesap_kodu->SET_TEXT ( "" );
            m_ui->lineedit_tek_hesap_ismi->clear();
            m_ui->frame_tek_hesap->setDisabled ( true );

            // tum bakiler tek hesapta bunlar degıstırılmez
            m_ui->frame_bakiyesiz_hesaplar->setEnabled( true );
            m_ui->frame_calismamis_hesaplar->setEnabled( true );

            FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_bakiye, "Bakiyeli");
            FIND_AND_SET_COMBOBOX_TEXT( m_ui->combo_box_islem, "Çalışmış");
        }
    }
    else if ( object EQ m_ui->checkbox_tarih_araligi ) {

        if ( m_ui->checkbox_tarih_araligi->isChecked() EQ false ) {
             m_ui->adakDate_baslangic_tarihi->SET_DATE( MALI_YIL_FIRST_DATE() );
             m_ui->adakDate_bitis_tarihi->SET_DATE( MALI_YIL_365_DATE() );
             m_ui->frame_tarih_araligi->setDisabled ( true );
        }
        else {
            m_ui->frame_tarih_araligi->setEnabled ( true );
            SET_FOCUS( m_ui->adakDate_baslangic_tarihi);
        }
    }
    else if ( object EQ m_ui->checkbox_nakli_yekun ) {

        if ( m_ui->checkbox_nakli_yekun->isChecked() EQ false ) {
            m_ui->frame_nakli_yekun->setDisabled ( true );
        }
        else {
            m_ui->frame_nakli_yekun->setEnabled ( true );
        }
    }
    else if ( object EQ m_ui->checkbox_ana_hesaplar ) {

        if ( m_ui->checkbox_ana_hesaplar->isChecked() EQ false ) {
            m_ui->frame_sadece_ana_hesaplari_goster->setDisabled ( true );
        }
        else {
            m_ui->frame_sadece_ana_hesaplari_goster->setEnabled ( true );
        }
    }


    return ADAK_OK;
}
Exemplo n.º 17
0
int PRS_EK_ODENEK_VE_KESINTI_FISI::GET_FIS_RECORD ( int record_id )
{

    SQL_QUERY   sql_query(DB);
    SQL_QUERY   query    (DB);

    sql_query.PREPARE_SELECT( "prs_kesinti_odenek_tanimlar ",
                              "kes_ode_tanim_id, kesinti_odenek_adi, aciklama, "
                              "bordro_donemi_ay, bordro_donemi_yil, "
                              "ssk_kesintisi_iceriyor_mu, damga_vergisi_iceriyor_mu,"
                              "gelir_vergisi_iceriyor_mu, kesinti_odenek_tarihi,"
                              "yuzde_mi, tutar, kesinti_odenek_no, bordrosu_kesildi_mi ",
                              "kes_ode_tanim_id = :kes_ode_tanim_id   "
                              "AND kesinti_odenek_turu = :kesinti_odenek_turu ");

    sql_query.SET_VALUE( ":kes_ode_tanim_id", record_id );
    sql_query.SET_VALUE( ":kesinti_odenek_turu", m_fis_turu );

    if ( sql_query.SELECT() EQ 0 ) {
        return ADAK_FAIL;
    }

    sql_query.NEXT();

    m_odenek_kesinti_no     = sql_query.VALUE("kesinti_odenek_no").toInt();
    m_bordrosu_kesildi_mi   = sql_query.VALUE("bordrosu_kesildi_mi").toInt();

    m_ui->lineEdit_odenek_kesinti_adi->setText( sql_query.VALUE("kesinti_odenek_adi").toString() );

    m_ui->adakDate_odenek_kesinti_tarihi->SET_DATE( sql_query.VALUE("kesinti_odenek_tarihi").toString() );
    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_bordro_donemi_ay, K9_GET_AYLAR_STRING( sql_query.VALUE("bordro_donemi_ay").toInt()));
    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_bordro_donemi_yil, sql_query.VALUE("bordro_donemi_yil").toString() );

    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_yuzde_mi, tr("TUTAR"));
    if ( sql_query.VALUE( "yuzde_mi").toInt() EQ PRS_YUZDE ) {
        FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_yuzde_mi, tr("YÜZDE"));
    }

    m_ui->commaEdit_tutar->SET_DOUBLE( sql_query.VALUE("tutar").toDouble());

    m_ui->checkBox_ssk_kesintisi->setChecked( sql_query.VALUE("ssk_kesintisi_iceriyor_mu").toInt() );
    m_ui->checkBox_gelir_vergisi_kesintisi->setChecked( sql_query.VALUE("gelir_vergisi_iceriyor_mu").toInt() );
    m_ui->checkBox_damga_vergisi_kesintisi->setChecked( sql_query.VALUE("damga_vergisi_iceriyor_mu").toInt() );


    query.PREPARE_SELECT ( "prs_ek_kesintiler_odenekler, prs_personeller",
                           "kesinti_odenek_id, prs_ek_kesintiler_odenekler.personel_id, cari_hesap_id, order_number ",
                           "prs_ek_kesintiler_odenekler.personel_id = prs_personeller.personel_id "
                           "AND kes_ode_tanim_id = :kes_ode_tanim_id ");

    query.SET_VALUE      ( ":kes_ode_tanim_id" , record_id );

    query.SELECT("order_number ASC" );

    while ( query.NEXT() EQ true ) {

        int p_current_row;

        p_current_row = ADD_NEW_LINE ();

        QSearchEdit * search_edit_persosnel_kodu     = ( QSearchEdit  * ) m_ui->table_widget->cellWidget ( p_current_row, PERSONEL_KODU );
        QLineEdit   * lineedit_personel_adi_soyadi   = ( QLineEdit    * ) m_ui->table_widget->cellWidget ( p_current_row, PERSONEL_AD_SOYAD );

        search_edit_persosnel_kodu->SET_TEXT( CARI_FIND_HESAP_KODU( query.VALUE("cari_hesap_id").toInt()));
        lineedit_personel_adi_soyadi->setText( CARI_FIND_HESAP_ISMI( query.VALUE("cari_hesap_id").toInt() ));

        QString id                                  = query.VALUE("kesinti_odenek_id").toString();
        QString order_number                        = query.VALUE("order_number").toString();

        QTableWidgetItem * new_item;

        new_item = new QTableWidgetItem(tr("%1").arg(id));
        m_ui->table_widget->setItem(p_current_row, ROW_ID_COLUMN, new_item);

        new_item = new QTableWidgetItem(tr("%1").arg(record_id));
        m_ui->table_widget->setItem(p_current_row, RECORD_ID_COLUMN, new_item);

        new_item = new QTableWidgetItem(tr("%1").arg(order_number));
        m_ui->table_widget->setItem(p_current_row, ORDER_NUMBER_COLUMN, new_item);

    }

    return ADAK_OK;
}
Exemplo n.º 18
0
int ADRES_YETKILILER_FISI::GET_FIS_RECORD ( int p_adres_id )
{
    SQL_QUERY   sql_query     ( DB );

    sql_query.PREPARE_SELECT ( "adr_adresler","firma_sahis_adi","adres_id=:adres_id");
    sql_query.SET_VALUE      ( ":adres", p_adres_id );

    if ( sql_query.SELECT() NE 0 ) {
        sql_query.NEXT();

        m_ui->label_adres_kaydi->setText(sql_query.VALUE(0).toString());
    }

    sql_query.PREPARE_SELECT ( "adr_yetkili_bilgileri, adr_adresler","yetkili_id, order_number, gorevi, "
                               "firma_sahis_adi, tel_ulke_kodu, tel_alan_kodu, telefon,"
                               "is_tel_alan_kodu, is_telefonu, cep_tel_gsm_kodu, cep_telefonu, "
                               "adr_yetkili_bilgileri.adres_id, is_telefonu_dahili",
                               "adr_yetkili_bilgileri.adres_id = adr_adresler.adres_id "
                               "AND adr_yetkili_bilgileri.firma_id = :firma_id ");

    sql_query.SET_VALUE      ( ":firma_id", p_adres_id );

    if ( sql_query.SELECT("order_number") EQ 0 ) {
        return ADAK_OK;
    }

    int current_row = 0;

    while ( sql_query.NEXT() EQ true ) {

        current_row = ADD_NEW_LINE ();

        QTableWidgetItem * yetkili_id_item = new QTableWidgetItem ( sql_query.VALUE(0).toString() );
        m_ui->table_widget_yetkililer->setItem ( current_row, YETKILI_ID_COLUMN, yetkili_id_item );

        QTableWidgetItem * firma_id_item = new QTableWidgetItem ( QVariant ( p_adres_id ).toString() );
        m_ui->table_widget_yetkililer->setItem ( current_row, FIRMA_ID_COLUMN, firma_id_item );

        QTableWidgetItem * yetki_order_item = new QTableWidgetItem ( sql_query.VALUE(1).toString() );
        m_ui->table_widget_yetkililer->setItem ( current_row, ORDER_COLUMN, yetki_order_item );

        QLineEdit  * lineEdit_sahis_id            = ( QLineEdit  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, SAHIS_ID_COLUMN            );
        QLineEdit  * lineEdit_yetkili_adi_soyadi  = ( QLineEdit  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_ADI_SOYADI_COLUMN  );
        QLineEdit  * lineEdit_yetkili_gorevi      = ( QLineEdit  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_GOREVI             );
        QLineEdit  * lineEdit_yetkili_is_telefonu = ( QLineEdit  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_IS_TELEFONU        );
        QLineEdit  * lineEdit_yetkili_gsm         = ( QLineEdit  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_CEP_TELEFONU       );
        QLineEdit  * lineEdit_yetkili_ev_telefonu = ( QLineEdit  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_EV_TELEFONU        );
        QComboBox  * comboBox_ulke_kodu           = ( QComboBox  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_ULKE_KODU          );
        QComboBox  * comboBox_ev_tel_alan_kodu    = ( QComboBox  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_EV_TEL_ALAN_KODU   );
        QComboBox  * comboBox_is_tel_alan_kodu    = ( QComboBox  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_IS_TEL_ALAN_KODU   );
        QComboBox  * comboBox_gsm_kodu            = ( QComboBox  * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_GSM_KODU           );
        QCommaEdit * commaEdit_is_tel_dahili      = ( QCommaEdit * ) m_ui->table_widget_yetkililer->cellWidget ( current_row, YETKILI_IS_TELEFONU_DAHILI );

        lineEdit_yetkili_gorevi->setText      ( sql_query.VALUE(2).toString() );
        lineEdit_yetkili_adi_soyadi->setText  ( sql_query.VALUE(3).toString() );

        FIND_AND_SET_COMBOBOX_TEXT ( comboBox_ulke_kodu,        sql_query.VALUE(4).toString() );

        SATIR_TELEFON_ALAN_KODLARINI_DOLDUR   ( current_row );

        FIND_AND_SET_COMBOBOX_TEXT ( comboBox_ev_tel_alan_kodu, sql_query.VALUE(5).toString() );
        lineEdit_yetkili_ev_telefonu->setText ( sql_query.VALUE(6).toString() );

        FIND_AND_SET_COMBOBOX_TEXT ( comboBox_is_tel_alan_kodu, sql_query.VALUE(7).toString() );
        lineEdit_yetkili_is_telefonu->setText ( sql_query.VALUE(8).toString() );

        FIND_AND_SET_COMBOBOX_TEXT ( comboBox_gsm_kodu, sql_query.VALUE(9).toString() );
        lineEdit_yetkili_gsm->setText ( sql_query.VALUE(10).toString() );

        lineEdit_sahis_id->setText ( sql_query.VALUE(11).toString() );

        commaEdit_is_tel_dahili->SET_INTEGER ( sql_query.VALUE(12).toInt() );
    }

    return ADAK_OK;
}
Exemplo n.º 19
0
void PRS_EK_ODENEK_VE_KESINTI_FISI::SETUP_FORM()
{

    SET_SETTING_NAME  ("EK_ODENEK_VE_KESINTI_FISI");
    SET_HELP_PAGE     ("personel-bordrosu_ek-odenek-tanimlama");

    if ( m_fis_turu EQ ENUM_PRS_ODENEK ) {
        SET_PAGE_TITLE    ( tr ( "PRS - EK ÖDENEK TANIMLAMA" ) );
    }
    else {
        SET_PAGE_TITLE    ( tr ( "PRS - EK KESİNTİ TANIMLAMA" ) );
    }

    REGISTER_BUTTONS_WIDGET ( m_ui->kernel_buttons_widget );

    SET_FIRST_FOCUS_WIDGET( m_ui->lineEdit_odenek_kesinti_adi );    

    REGISTER_TABLE_WIDGET ( m_ui->table_widget, 6 );

    SET_FIS_ORDER_COLUMN_NUMBER ( ORDER_NUMBER_COLUMN );
    SET_FORM_ID_COLUMN_POSITION ( RECORD_ID_COLUMN );
    SET_ROW_ID_COLUMN_POSITION  ( ROW_ID_COLUMN );
    SET_NUMBER_OF_HIDDEN_COLUMN ( 4 );

    // Bu fonksiyon ise kernelin otomatik olarak satir order numlarin reorganize edilmesi saglar.
    // Burda kernela database bilgilerini setleyerek bu isi yapabiliriz.

    DISABLE_CLEAR_ON_WIDGET( m_ui->comboBox_yuzde_mi );

    QStringList kesinti_yuzde_mi;
    kesinti_yuzde_mi << tr("TUTAR")<< tr("YÜZDE");

    m_ui->comboBox_yuzde_mi->addItems( kesinti_yuzde_mi );

    SET_FIS_ORDER_DATABASE ("prs_ek_kesintiler_odenekler", "order_number", "kesinti_odenek_id" );

    SET_TABLE_ROW_WIDGETS ( PERSONEL_KODU      , WIDGET_SEARCH_EDIT );
    SET_TABLE_ROW_WIDGETS ( PERSONEL_AD_SOYAD  , WIDGET_LINE_EDIT );


    DISABLE_CLEAR_ON_WIDGET( m_ui->comboBox_bordro_donemi_ay );
    DISABLE_CLEAR_ON_WIDGET( m_ui->comboBox_bordro_donemi_yil );

    K9_FILL_COMBOBOX_AYLAR( m_ui->comboBox_bordro_donemi_ay );

    PRS_FILL_COMBO_BOX_BORDRO_YILLARI( m_ui->comboBox_bordro_donemi_yil );

    int current_month = QDate::currentDate().month();
    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_bordro_donemi_ay, K9_GET_AYLAR_STRING( current_month) );

    m_ui->lineEdit_odenek_kesinti_adi->setMaxLength( 50 );

    m_ui->limitedTextEdit_aciklama->SET_MAX_STRING_LENGTH( 512 );

    m_ui->table_widget->setHorizontalHeaderLabels (QStringList() << "row_id" << "fis_id" << "order_number_column" << "personel_id"
                                                   << tr("Personel Kodu") << tr("Personel Adı Soyadı") << tr("") << tr("") );

    m_ui->table_widget->setColumnWidth( PERSONEL_KODU      , 100 );
    m_ui->table_widget->setColumnWidth( PERSONEL_AD_SOYAD  , 550 );

    FOCUS_FIRST_WIDGET ();

    if ( m_fis_turu EQ ENUM_PRS_KESINTI ) {

        m_ui->checkBox_ssk_kesintisi->setVisible( false );
        m_ui->checkBox_gelir_vergisi_kesintisi->setVisible( false );
        m_ui->checkBox_damga_vergisi_kesintisi->setVisible( false );
    }
}
Exemplo n.º 20
0
void FAT_FATURA_LISTESI_BATCH::SETUP_FORM()
{
    SET_PAGE_TITLE    ( tr ( "FAT - FATURA LİSTESİ" ) );
    SET_HELP_PAGE     ("fatura-islemleri_fatura-listesi");

    REGISTER_BUTTON_WIDGET ( m_ui->widget_batch_buttons );
    m_ui->frame_sirket_filtresi->setVisible( false );
    m_ui->checkBox_sirket_filtresi->setVisible( false );

    FAT_FILL_ACIK_KAPALI_COMBO_BOX( m_ui->comboBox_acik_kapali_fatura );

    FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_acik_kapali_fatura, FAT_GET_ACIK_KAPALI_FATURA_STRING( ENUM_TUM_FATURALAR ));

    m_ui->checkBox_tarih_araligi->setChecked( true );
    m_ui->frame_tarih_araligi->setEnabled( true );

    SET_FIRST_FOCUS_WIDGET( m_ui->adakDate_bas_tarihi );

    if ( E9_KULLANICI_SIRKET_DEGISTIRE_BILIR_MI() EQ EVET ) {
        m_ui->frame_sirket_filtresi->setVisible( true );
        m_ui->checkBox_sirket_filtresi->setVisible( true );

        m_ui->frame_sirket_filtresi->setEnabled( true );
        m_ui->checkBox_sirket_filtresi->setChecked( true );
    }

    DISABLE_CLEAR_ON_WIDGET( m_ui->comboBox_sirket_filtresi );

    SET_SETTING_NAME  ("FAT_FATURA_LISTESI_BATCH");
    SET_NAME_OF_RUN_BATCH_BUTTON ( "Rapor Al" );

    SET_ENTER_KEY_FOR_RUN_BATCH( true );

    m_ui->commaEdit_min_tutar->SET_PRECISION( 2 );
    m_ui->commaEdit_min_tutar->SET_RETURN_EMPTY( false );

    m_ui->commaEdit_min_tutar->SET_PRECISION( 2 );
    m_ui->commaEdit_max_tutar->SET_RETURN_EMPTY( false );

    m_ui->adakDate_bas_tarihi->SET_DATE(MALI_YIL_FIRST_DATE());
    m_ui->adakDate_bts_tarihi->SET_DATE(MALI_ARRAY_LAST_DATE());

    m_ui->frame_fatura_durumu->setDisabled(true);
    m_ui->comboBox_irsaliye_durumu->addItems(QStringList() << tr("İrsaliyelenmiş") << tr("İrsaliyelenmemiş"));
    m_ui->comboBox_irsaliye_durumu->setCurrentIndex(-1);
    m_ui->frame_cari_hesap->setDisabled(true);
    m_ui->frame_tutar_araligi->setDisabled(true);
    m_ui->frame_fatura_alis_satis_turu->setDisabled(true);
    m_ui->label_sirket->setDisabled(true);
    m_ui->comboBox_sirket_filtresi->setDisabled(true);

    m_ui->frame_fatura_turu->setEnabled( false );

    FAT_FILL_ALIS_SATIS_FAT_TURU_COMBO_BOX( m_ui->comboBox_fatura_alis_satis_turu  );

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

    m_cari_hesap_id = -1;
    m_depo_id       = -1;

}
Exemplo n.º 21
0
void CARI_KART_ARAMA::SETUP_FORM()
{
    SET_HELP_PAGE     ( "cari_kart_arama.html" );

    // PERSOANEL MODULU BU ARAMAYI KULLANIYOR KENDI BASLIGI GELMESI LAZIM
    if ( m_program_id EQ E9_PROGRAMI AND m_modul_id NE PERSONEL_MODULU ) {
        if ( m_cari_kart_turu EQ SAHIS_KAYDI ) {
            SET_PAGE_TITLE("CARİ - ŞAHIS KARTI ARAMA");
        }
        else if( m_cari_kart_turu EQ FIRMA_KAYDI ) {
            SET_PAGE_TITLE("CARİ - FİRMA KARTI ARAMA");
        }
        else {
            SET_PAGE_TITLE("CARİ - CARİ KART ARAMA");
        }
    }

    m_ui->checkbox_cari_hesap_ismi_hesap_kodu->setChecked ( true  );
    m_ui->frame_ili_ilcesi->setEnabled                    ( false );

    m_ui->frame_telefon->setEnabled( false );
    m_ui->frame_sektor_or_meslek->setEnabled( false );

    if ( m_cari_kart_turu EQ SAHIS_KAYDI ) {
        GET_MESLEKLER( m_ui->comboBox_sektor_or_meslek );
    }
    else if ( m_cari_kart_turu EQ FIRMA_KAYDI ) {
        GET_SEKTORLER( m_ui->comboBox_sektor_or_meslek );
    }
    else {
        m_ui->frame_sektor_or_meslek->hide();
        m_ui->checkBox_sektor_or_meslek->hide();
    }

    GET_ILLER ( m_ui->combobox_sehir_ismi );

    REGISTER_TABLE_WIDGET         ( m_ui->table_widget );
    REGISTER_ARAMA_BUTTONS_WIDGET ( m_ui->widget_batch_button );

    SET_HEADERS(QStringList()<<tr("Cari \n Hesap Id")<<tr("Kodu")<<tr("Adı")
                << QObject::tr("Borcu") << "" << QObject::tr("Alacağı") << ""
                <<tr("Şehir")<<tr("İlçe")<<tr("Semt") << tr(""));

    SET_SORTING            ( false );

    SET_FIRST_FOCUS_WIDGET ( m_ui->lineedit_hesap_ismi_hesap_kodu );

    m_ui->table_widget->hideColumn(0);

    m_ui->lineedit_hesap_ismi_hesap_kodu->setText( m_cari_hesap_ismi_hesap_kodu );

    if ( m_ui->lineedit_hesap_ismi_hesap_kodu->text().isEmpty() EQ false ) {
        AUTO_START ();
    }
    else {
        m_ui->lineedit_hesap_ismi_hesap_kodu->setText("*");
    }

    m_ui->checkbox_gruplar->setChecked  ( false );
    m_ui->frame_gruplar->setEnabled     ( false );

    m_ui->table_widget->setColumnWidth  ( 1, 90  );
    m_ui->table_widget->setColumnWidth  ( 2, 190 );
    m_ui->table_widget->setColumnWidth  ( 3, 90  );
    m_ui->table_widget->setColumnWidth  ( 4, 30  );
    m_ui->table_widget->setColumnWidth  ( 5, 90  );
    m_ui->table_widget->setColumnWidth  ( 6, 30  );
    m_ui->table_widget->setColumnWidth  ( 7, 90  );
    m_ui->table_widget->setColumnWidth  ( 8, 90  );
    m_ui->table_widget->setColumnWidth  ( 9, 90  );
    m_ui->table_widget->setColumnWidth  ( 10,25  );

    if ( m_islem_turu EQ CARI_KART_ARAMA_ISLEMI ) {

        m_ui->label_dosya_encoding->setVisible   ( false );
        m_ui->comboBox_dosya_encoding->setVisible( false );
        m_ui->tool_button_export->setVisible     ( false );

        SET_PAGE_TITLE    ( m_ekran_ismi );
    }
    else {
        QList< QByteArray > available_coding_list = QTextCodec::availableCodecs() ;
        for( int i = 0 ; i < available_coding_list.size() ; ++i ){
            m_ui->comboBox_dosya_encoding->addItem( available_coding_list.at(i) );
        }

        FIND_AND_SET_COMBOBOX_TEXT( m_ui->comboBox_dosya_encoding, tr("UTF-8"));
        SET_PAGE_TITLE ( tr ( "DIŞARIYA KAYIT İHRAÇ ET") );
        AUTO_START();
    }

    SET_SETTING_NAME                    ( "CARI_KART_ARAMA"    );
    SET_ENTER_KEY_FOR_RUN_BATCH         ( true                 );
    SET_FIND_BUTTON_NAME                ( tr ( "    Bul    " ) );
}