¸ñÈ­¿¬
»ç´ÂÀ̾߱â
±â¼úÁö¿ø
ȸ¿ø°Ô½ÃÆÇ
°øÁö»çÇ×
ÀÚ·á½Ç
º£Å¸Å×½ºÅÍ
»ç´ÂÀ̾߱â
 
ÀÛ¼ºÀÏ : 10-08-09 22:55
[¼¼»ó»ç´ÂÀ̾߱â] ÀÌÀÚ º¸´Ù ´õ ¾î·Á¿î ÀÔ±ÝÀ» ¸ÂÃß´Ù...
 ±Û¾´ÀÌ : ±Ç¿ÀÁØ
Á¶È¸ : 7,562  
ÀÔ±Ý ¿¹Á¤ÀÏ + ÀԱݿ¹Á¤ ±Ý¾×ÀÌ Àִµ¥ ¹ÝÇØ
 
µé¾î¿Â ±Ý¾×Àº partial·Î ¾î´À°Ô ¾î´À°ÍÀÎÁö ¸ð¸£°Ô µé¾î ¿Â case°¡ ÀÖ½À´Ï´Ù.
 
1.ÀÏ´Ü µé¾î¿Â »ç¶÷µé ¸ñ·ÏÀ» ´ÙÀ½
2.µé¾î¿Â°Í ¸ñ·ÏÀ¸·Î ¸¸µì´Ï´Ù.
3.ÀÔ±Ý ¿¹Á¤ ¸ñ·ÏÀ» ¸¸µì´Ï´Ù.
 
1ÀÇ Á¶°ÇÀ¸·Î whileÀ» ¸¸µë !Eof
2ÀÇ Á¶°Ç°ªÀ» °¡Á®¿Í¼­ while·Î ¸¸µë !Eof
3ÀÇ Á¶°Ç°ªÀ» °¡Á®¿Í¼Ò while·Î ¸¸µë .t.
 
2ÀÇ ±Ý¾×À» 3ÀÇ °ªÀ» »©°í ³²À¸¸é
     3ÀÇ ´ÙÀ½À¸·Î ³Ñ°Å°¨
3ÀÇ °ªÀÌ ´õ ¸¹À¸¸é 2ÀÇ ³²Àº °ªÀ» ±â¾ïÇÏ°í
   2ÀÇ ´ÙÀ½ °ªÀ¸·Î skip
   2°ªÀ» 3°ú °è¼Ó ºñ±³
 
 
ÀÌ·±½ÄÀ¸·Î ÇÁ·Î±×·¥À» ¸¸µé¾î ÇØ°áÇß½À´Ï´Ù ¤Ð¤Ð
 
 
   KMPAY->( dbGotop() )
   oMeter := TDrMeta():New( "Converting...", "Wait...", KMPAY->( RecCount() ) )

   WHILE !KMPAY->(Eof())
         cQuery := "select * from m_pay where J_NO = " + ALLTRIM( KMPAY->J_NO ) + " and pay_code='001' order by pay_code2,pay_date"
         ::oPayDb:Query( cQuery,,,,,.f.)
         oMeter:SetData( ++nCounter )
         KMPAY2->(OrdScope( 0, KMPAY->J_NO ))
         KMPAY2->(OrdScope( 1, KMPAY->J_NO ))
         KMPAY2->(dbGotop())

         WHILE !KMPAY2->(Eof())
               nMoney    := KMPAY2->J_MONEY
               nInMoney  := 0
               WHILE .T.
                     //kmpay2->(dr_browse())
                     //::oPayDb:Browse()
                     IF nMoney - (::oPayDb:PAY_MONEY - nInMoney) >= 0
                        ::oPayDb:PAY_IN_MONEY := ::oPayDb:PAY_MONEY
                        ::oPayDb:PAY_IN_DATE  := KMPAY2->J_DATE
                        nMoney   := nMoney - (::oPayDb:PAY_MONEY - nInMoney)
                        nInMoney := 0
                        ::oPayDb:update()

                        ::oPayInDb:Blank()
                        ::oPayInDb:CITY_CODE       := "002"
                        ::oPayInDb:J_NO            := KMPAY->J_NO
                        ::oPayInDb:PAY_CODE        := ::oPayDb:PAY_CODE
                        ::oPayInDb:PAY_CODE2       := ::oPayDb:PAY_CODE2
                        ::oPayInDb:PAY_NAME        := ::oPayDb:PAY_NAME
                        ::oPayInDb:PAY_IN_DATE     := KMPAY2->J_DATE
                        ::oPayInDb:PAY_IN_MONEY    := ::oPayDb:PAY_MONEY
                        ::oPayInDb:PAY_BANK        := KMPAY2->J_BANK
                        ::oPayInDb:PAY_SENDER      := KMPAY2->J_NAME

                        ::oPayInDb:Insert()
                        ::oPayDb:Skip()
 
                     ELSE
                        nInMoney += nMoney
                        KMPAY2->(dbSkip())
                        nMoney := KMPAY2->J_MONEY
                     ENDIF
                     IF nMoney == 0
                        EXIT
                     ENDIF
                     IF KMPAY2->(Eof())
                        EXIT
                     ENDIF
               ENDDO
               KMPAY2->( dbSkip() )
         ENDDO

         IF nInMoney > 0
            KMPAY2->( dbSkip(-1) )
            ::oPayDb:PAY_IN_MONEY := nInMoney
            ::oPayDb:PAY_IN_DATE  := KMPAY2->J_DATE
            ::oPayDb:update()
            ::oPayInDb:CITY_CODE       := "002"
            ::oPayInDb:J_NO            := KMPAY->J_NO
            ::oPayInDb:PAY_CODE        := ::oPayDb:PAY_CODE
            ::oPayInDb:PAY_CODE2       := ::oPayDb:PAY_CODE2
            ::oPayInDb:PAY_NAME        := ::oPayDb:PAY_NAME
            ::oPayInDb:PAY_IN_DATE     := KMPAY2->J_DATE
            ::oPayInDb:PAY_IN_MONEY    := nInMoney
            ::oPayInDb:PAY_BANK        := KMPAY2->J_BANK
            ::oPayInDb:PAY_SENDER      := KMPAY2->J_NAME

            ::oPayInDb:Insert()
         ENDIF
         KMPAY->( dbSkip() )
   ENDDO
 
   oMeter:End()

 
 

 
Total 303
¹øÈ£ Á¦   ¸ñ ±Û¾´ÀÌ ³¯Â¥ Á¶È¸
258   [¼¼»ó»ç´ÂÀ̾߱â] ¾Èµå·ÎÀ̵å¿ë ½º¸¶Æ®Æù °³¹ßÅø ±¸°æÁ» ÇÒ±î¿ä. (1) ¹®º´»ê 10-13 9533
257   [¼¼»ó»ç´ÂÀ̾߱â] º¯È­ÀÇ ½Ã´ë... (3) ±Ç¿ÀÁØ 09-14 7382
256   [µî±Þ¾÷¿äû] ¾ðÁ¦³ª µî¾÷ÀÌ µÇ³ª¿ä? (1) ¼­¿ø 09-13 8447
255   [¼¼»ó»ç´ÂÀ̾߱â] DrMySQL Sync¼º´ÉÀ» 100%³ôÀ̱â... (1) ±Ç¿ÀÁØ 09-02 7276
254   [µî±Þ¾÷¿äû] Sugar Tech ÀÔ´Ï´Ù.. (1) ¼³ÅÁ°¡·ò 08-26 8782
253   [µî±Þ¾÷¿äû] ±ÇÇÑ µî¾÷ didim 08-18 8145
252   [¼¼»ó»ç´ÂÀ̾߱â] ÀÌÀÚ °è»ê ¼Ò½º (1) ±Ç¿ÀÁØ 08-09 7961
251   [¼¼»ó»ç´ÂÀ̾߱â] ÀÌÀÚ º¸´Ù ´õ ¾î·Á¿î ÀÔ±ÝÀ» ¸ÂÃß´Ù... ±Ç¿ÀÁØ 08-09 7563
250   [¼¼»ó»ç´ÂÀ̾߱â] ÀÌÀÚ °è»êÀ» ÇÏ´Ù... (2) ±Ç¿ÀÁØ 08-09 7103
249   [µî±Þ¾÷¿äû] µî¾÷ºÎŹÇÕ´Ï´Ù. hoho 08-09 7818
248   [¼¼»ó»ç´ÂÀ̾߱â] ¾Èµå·ÎÀÌµå ¸¸µì½Ã´Ù... ±Ç¿ÀÁØ 07-07 7105
247   [¼¼»ó»ç´ÂÀ̾߱â] ¾Æ³»±¸ÇÔ ±Ç¿ÀÁØ 07-05 7537
246   [¼¼»ó»ç´ÂÀ̾߱â] °ú¸Á°£»êÄ®·ýÀ» Á¶»çÇÏ´Ù... ±Ç¿ÀÁØ 07-02 8219
245   [¼¼»ó»ç´ÂÀ̾߱â] iPhoneÀÌ³Ä ¾Èµå·ÎÀ̵å³Ä? (1) ±Ç¿ÀÁØ 06-26 7039
244   [¼¼»ó»ç´ÂÀ̾߱â] 64ºñÆ®·Î °¡°ÔµÇ¸é ¾ÆÀÌÆù µîÀÇ ¾îÇø®ÄÉÀÌ¼Ç °³¹ßÀÌ ¡¦ (1) À̺´È« 06-25 7056
 1  2  3  4  5  6  7  8  9  10    
COPYRIGHT© Fivetech.net. All RIGHTS RESERVED.
For more information webmaster | webmaster@fivetech.net | Tel 02-566-6826 | (ÇØ¿Ü) +82-2-566-6826