¸ñÈ­¿¬
»ç´ÂÀ̾߱â
±â¼úÁö¿ø
ȸ¿ø°Ô½ÃÆÇ
°øÁö»çÇ×
ÀÚ·á½Ç
º£Å¸Å×½ºÅÍ
»ç´ÂÀ̾߱â
 
ÀÛ¼ºÀÏ : 10-08-09 22:56
[¼¼»ó»ç´ÂÀ̾߱â] ÀÌÀÚ °è»ê ¼Ò½º
 ±Û¾´ÀÌ : ±Ç¿ÀÁØ
Á¶È¸ : 7,960  
   oMeter := TDrMeta():New( "¿¬Ã¼ ÀÌÀÚ¸¦ °è»êÁßÀÔ´Ï´Ù.", "Wait...", ::oFindDb:RecCount() )

   WHILE !::oFindDb:Eof()

         cQuery := "select * from m_payin where "
         cQuery += " J_NO = "      + Clip2Sql( ::oFindDb:J_NO )+ " and "
         cQuery += " PAY_CODE = "  + Clip2Sql( ALLTRIM( ::oFindDb:PAY_CODE  ) ) + " and "
         cQuery += " PAY_CODE2 = " + Clip2Sql( ALLTRIM( ::oFindDb:PAY_CODE2 ) )
         cQuery += " order by PAY_IN_DATE"
         oFindDb2:Query( cQuery )
         //::Get_PayIn( oFindDb2, ::oFindDb:J_NO, ::oFindDb:PAY_CODE, ::oFindDb:PAY_CODE2 )
 

         IF (::oFindDb:PAY_MONEY == oFindDb2:PAY_IN_MONEY) .AND. (::oFindDb:PAY_DATE == oFindDb2:PAY_IN_DATE)
            ::oFindDb:Skip()
            LOOP
         ENDIF
         oMeter:SetData( ::oFindDb:RecNo(),,,,,.f. )
         /*
            ¿ÏÀü¹Ì³³
         */
         IF oFindDb2:RecCount() == 0
            oDispDb:Append()
               oDispDb:J_NO                := ::oFindDb:J_NO
               oDispDb:I_PAY_CODE          := ::oFindDb:PAY_CODE
               oDispDb:I_PAY_CODE2         := ::oFindDb:PAY_CODE2
               oDispDb:I_DESC              := ::oFindDb:PAY_NAME
               oDispDb:I_DATE1             := ::oFindDb:PAY_DATE
               oDispDb:I_DATE2             := dDate
               oDispDb:I_MONEY             := ::oFindDb:PAY_MONEY
               oDispDb:I_IN_MONEY          := 0
               oDispDb:I_JAN               := ::oFindDb:PAY_MONEY
               oDispDb:I_DAYS              := Dr_ELAPSED( oDispDb:I_DATE1, oDispDb:I_DATE2 )[1][1] + 1
               oDispDb:I_RATIO             := ::oFindDb:PAY_RATIO
               oDispDb:I_FEE               := Count_Fee( oDispDb:I_JAN, ::oFindDb:PAY_RATIO, oDispDb:I_DAYS, oDispDb )
            oDispDb:Save()
            ::oFindDb:Skip()
            LOOP
         ENDIF

         nPayMoney := ::oFindDb:PAY_MONEY
         nINMoney := oFindDb2:PAY_IN_MONEY
         dPaydate := ::oFindDb:PAY_DATE
 
         /*
           ½±°Ô »ý°¢ Çϱâ À§ÇØ ºÐ¸®ÇÔ
         */
         WHILE  !oFindDb2:Eof()
                nINMoney := oFindDb2:PAY_IN_MONEY
                IF oFinddb2:RecNo() > 1
                   IF EMPTY( oDispDb:I_DATE2 )
                      IF nInMoney == nPayMoney .AND. oDispDb:I_DATE1  == oFindDb2:PAY_IN_DATE
                         oDispDb:I_DATE2             := oFindDb2:PAY_IN_DATE
                      ELSE
                         oDispDb:I_DATE2             := oFindDb2:PAY_IN_DATE -1
                      ENDIF
                      oDispDb:I_JAN               := nPayMoney
                      oDispDb:I_RATIO             := ::oFindDb:PAY_RATIO
                      oDispDb:I_DAYS              := Dr_ELAPSED( oDispDb:I_DATE1, oDispDb:I_DATE2 )[1][1]
                      oDispDb:I_FEE               := Count_Fee( oDispDb:I_JAN, ::oFindDb:PAY_RATIO, oDispDb:I_DAYS, oDispDb )
                      oDispDb:Save()
                   ENDIF
               ENDIF
                oDispDb:Append()
                oDispDb:J_NO                := ::oFindDb:J_NO
                oDispDb:I_PAY_CODE          := ::oFindDb:PAY_CODE
                oDispDb:I_PAY_CODE2         := ::oFindDb:PAY_CODE2
                oDispDb:I_DESC              := ::oFindDb:PAY_NAME
                oDispDb:I_DATE1             := ::oFindDb:PAY_DATE
                oDispDb:I_MONEY             := nPayMoney
                oDispDb:Save()
                IF nPayMoney <= oFindDb2:PAY_IN_MONEY
                   oDispDb:I_DATE2             := oFindDb2:PAY_IN_DATE
                   oDispDb:I_IN_MONEY          := nInMoney
                   oDispDb:I_JAN               := nInMoney
                   oDispDb:I_RATIO             := ::oFindDb:PAY_RATIO
                   oDispDb:I_DAYS              := Dr_ELAPSED( oDispDb:I_DATE1, oDispDb:I_DATE2 )[1][1]
                   oDispDb:I_FEE               := Count_Fee( oDispDb:I_JAN, ::oFindDb:PAY_RATIO, oDispDb:I_DAYS,  oDispDb )
                   oDispDb:Save()
                   oFindDb2:Skip()
                   LOOP
                ELSE
                   oDispDb:I_DATE2             := oFindDb2:PAY_IN_DATE
                   oDispDb:I_IN_MONEY          := nInMoney
                   oDispDb:I_JAN               := nInMoney
                   oDispDb:I_RATIO             := ::oFindDb:PAY_RATIO
                   oDispDb:I_DAYS              := Dr_ELAPSED( oDispDb:I_DATE1, oDispDb:I_DATE2 )[1][1]
                   oDispDb:I_FEE               := Count_Fee( oDispDb:I_JAN, ::oFindDb:PAY_RATIO, oDispDb:I_DAYS, oDispDb )
                   oDispDb:Save()
                   nPayMoney := ::oFindDb:PAY_MONEY - oFindDb2:PAY_IN_MONEY
                   oDispDb:Append()
                   oDispDb:J_NO                := ::oFindDb:J_NO
                   oDispDb:I_PAY_CODE          := ::oFindDb:PAY_CODE
                   oDispDb:I_PAY_CODE2         := ::oFindDb:PAY_CODE2
                   oDispDb:I_DESC              := ::oFindDb:PAY_NAME
                   oDispDb:I_DATE1             := ::oFindDb:PAY_DATE
                   oDispDb:I_MONEY             := nPayMoney
                   oDispDb:Save()
                   oFindDb2:Skip()
                ENDIF

         ENDDO

         IF EMPTY( oDispDb:I_DATE2 )
            oDispDb:I_DATE2             := dDate
            oDispDb:I_JAN               := nPayMoney
            oDispDb:I_RATIO             := ::oFindDb:PAY_RATIO
            oDispDb:I_DAYS              := Dr_ELAPSED( oDispDb:I_DATE1, oDispDb:I_DATE2 )[1][1]
            IF nInMoney == 0
               oDispDb:I_DAYS              := oDispDb:I_DAYS + 1
            ENDIF
            oDispDb:I_FEE               := Count_Fee( oDispDb:I_JAN, ::oFindDb:PAY_RATIO, oDispDb:I_DAYS, oDispDb )
            oDispDb:Save()
         ENDIF

         ::oFindDb:Skip()
   ENDDO

±Ç¿ÀÁØ   10-08-09 22:56
ÀÌÀÚ °è»ê ¼Ò½ºÀÔ´Ï´Ù.
 
 

 
Total 303
¹øÈ£ Á¦   ¸ñ ±Û¾´ÀÌ ³¯Â¥ Á¶È¸
258   [¼¼»ó»ç´ÂÀ̾߱â] ¾Èµå·ÎÀ̵å¿ë ½º¸¶Æ®Æù °³¹ßÅø ±¸°æÁ» ÇÒ±î¿ä. (1) ¹®º´»ê 10-13 9533
257   [¼¼»ó»ç´ÂÀ̾߱â] º¯È­ÀÇ ½Ã´ë... (3) ±Ç¿ÀÁØ 09-14 7382
256   [µî±Þ¾÷¿äû] ¾ðÁ¦³ª µî¾÷ÀÌ µÇ³ª¿ä? (1) ¼­¿ø 09-13 8447
255   [¼¼»ó»ç´ÂÀ̾߱â] DrMySQL Sync¼º´ÉÀ» 100%³ôÀ̱â... (1) ±Ç¿ÀÁØ 09-02 7275
254   [µî±Þ¾÷¿äû] Sugar Tech ÀÔ´Ï´Ù.. (1) ¼³ÅÁ°¡·ò 08-26 8782
253   [µî±Þ¾÷¿äû] ±ÇÇÑ µî¾÷ didim 08-18 8145
252   [¼¼»ó»ç´ÂÀ̾߱â] ÀÌÀÚ °è»ê ¼Ò½º (1) ±Ç¿ÀÁØ 08-09 7961
251   [¼¼»ó»ç´ÂÀ̾߱â] ÀÌÀÚ º¸´Ù ´õ ¾î·Á¿î ÀÔ±ÝÀ» ¸ÂÃß´Ù... ±Ç¿ÀÁØ 08-09 7562
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