Blog Of Sem: November 2018

sql server insert trigger basit yol

Logo trigger ozel kod



https://www.youtube.com/watch?v=JFHKa3PEYuQ


CREATE TRIGGER KOD
ON LG_005_01_INVOICE
FOR INSERT
AS
DECLARE @GRPCODE INT, @SPECODE NVARCHAR(20), @LOGICALREF INT

SELECT @GRPCODE = GRPCODE, @SPECODE = SPECODE, @LOGICALREF = LOGICALREF FROM INSERTED

IF (@GRPCODE =1)
BEGIN
UPDATE LG_005_01_INVOICE SET SPECODE = 'ALIŞ' WHERE LOGICALREF = @LOGICALREF
END
ELSE
BEGIN
UPDATE LG_005_01_INVOICE SET SPECODE ='SATIŞ' WHERE LOGICALREF =@LOGICALREF
END

Sql Server HIZLI Sorgu

select * into #satislar from logo_view_satislar_2014_2015 --sql serverde masterin altinda tempdbye atar sadece kullanılan sezondaki kisi erisebilir sql kapanip acilirsa sifirlanir

select yil,sum(toplamtutar) from #satislar group by yil

https://youtu.be/Tl-NWu1VPMc?t=5309

React native app

https://nodejs.org/en/download/ indir ve kur
https://www.sublimetext.com/3 kur
sublime ac->view->show consolea gir ve burdaki kodlari ekle
https://packagecontrol.io/installation
android studio ve bluestack kur
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Windows x64 207.22 MB  jdk-8u191-windows-x64.exe kur

cmd
npm install -g expo-cli
npm install -g react-native-cli
npm install -g create-react-native-app
react-native init projectNameHere
cd projectNameHere
react-native run-android


ENVIRMNT USER PATH
%LOCALAPPDATA%\Android\sdk\platform-tools

SYSTEM PATH:C:\Program Files\Java\jdk1.8.0_191
SYSTEM NEW JAVA_HOME C:\Program Files\Java\jdk1.8.0_191
F:\masaustussd\react native\test\android\ klasorunun icine local.properties isminde dosya YARAT ve icine sdk.dir = C:\\Users\\Pnp\\AppData\\Local\\Android\\sdk



Sentez Live Erp Kesin Yevmiyeyi Silme

OIuşan Sorunlar:
- Kesin Yevmiye Tarihinden Önce İşlem Yapılamaz .
- entegrasyon fişi yevmiye madde numarasına sahip. Bu fiş üzerinden işlem yapamazsınız .


select RegBookNo,  * from Erp_GLReceipt --RegBookNo boş deilse yevmiye oluşturulmuş demektir

select * from Erp_GLRegBook --yevmiye oluşan fiş

update  Erp_GLReceipt set RegBookNo = null --yevmiye oluştuysa sil

SQL SERVER SISTEMI KASMADAN SILME WHILE

 DECLARE @Rowcount INT = 1 WHILE @Rowcount > 0 BEGIN DELETE TOP (50000)   FROM  LG_013_01_PAYTRANS where ORGLOGOID LIKE 'TNYF%'
  SET @Rowcount = @@ROWCOUNT
END

ps3 crack filezilla

ethernet kablsonu bagla
Settings > Network Settings > Settings and Connection Status List.  ipyi not et
sarkı usbsini ps3e tak
pacckate setupa gir
sarkı usbsinin içindeki ortadaki programı kur
multimanin oldugu kısımda fileboxa gir ve bilgisardan filezillayı ac
Host: Your PS3's IP address
Port: 21
Logon type: Normal
User: anonymous
Password: (Clear it out and leave it blank)
On the "Transfer settings" tab:
Transfer mode: active
Tick "Limit number of simultaneous connections" and set it to 1
connect okeydir
oyunu "dev_hdd0/GAMEZ" icine at
ve multimane gir refresh yap

LOGO GO XML VERI ALMA SATIN ALMA FATURASI

ILK TYPEIN ALTINA <NUMBER>FATURA NO22</NUMBER> OLURSA DOCNOLARDIR
IKINCI TYPIN ALTINA <INVOICE_NUMBER>FATURA NO22</INVOICE_NUMBER>



ASAGIYI XML OLARAK KAYDET

<?xml version="1.0" encoding="UTF-8"?>
<PURCHASE_INVOICES>
   <INVOICE DBOP="INS">
      <TYPE>1</TYPE>

      <DATE>05.04.2017</DATE>
      <TIME>389550080</TIME>
      <AUXIL_CODE>1</AUXIL_CODE>
      <ARP_CODE>SATICI001</ARP_CODE>
      <POST_FLAGS>247</POST_FLAGS>
      <VAT_RATE>3</VAT_RATE>
      <TOTAL_DISCOUNTED>24</TOTAL_DISCOUNTED>
      <TOTAL_GROSS>24</TOTAL_GROSS>
      <TOTAL_NET>24</TOTAL_NET>
      <TC_NET>24</TC_NET>
      <RC_XRATE>1</RC_XRATE>
      <RC_NET>24</RC_NET>
      <CREATED_BY>1</CREATED_BY>
      <DATE_CREATED>05.04.2018</DATE_CREATED>
      <HOUR_CREATED>23</HOUR_CREATED>
      <MIN_CREATED>57</MIN_CREATED>
      <SEC_CREATED>51</SEC_CREATED>
      <CURRSEL_TOTALS>2</CURRSEL_TOTALS>
      <DATA_SITEID>1</DATA_SITEID>
      <DISPATCHES>
         <DISPATCH>
            <TYPE>1</TYPE>

            <DATE>05.04.2017</DATE>
            <TIME>389550146</TIME>
            <AUXIL_CODE>1</AUXIL_CODE>
            <ARP_CODE>SATICI001</ARP_CODE>
            <INVOICED>1</INVOICED>
            <TOTAL_DISCOUNTED>24</TOTAL_DISCOUNTED>
            <TOTAL_GROSS>24</TOTAL_GROSS>
            <TOTAL_NET>24</TOTAL_NET>
            <RC_RATE>1</RC_RATE>
            <RC_NET>24</RC_NET>
            <CREATED_BY>1</CREATED_BY>
            <DATE_CREATED>05.04.2018</DATE_CREATED>
            <HOUR_CREATED>23</HOUR_CREATED>
            <MIN_CREATED>57</MIN_CREATED>
            <SEC_CREATED>52</SEC_CREATED>
            <CURRSEL_TOTALS>2</CURRSEL_TOTALS>
            <DATA_SITEID>1</DATA_SITEID>
            <ORIG_NUMBER>0000000000051667</ORIG_NUMBER>
            <ORGLOGOID />
            <DEDUCTIONPART1>2</DEDUCTIONPART1>
            <DEDUCTIONPART2>3</DEDUCTIONPART2>
            <AFFECT_RISK>0</AFFECT_RISK>
            <DISP_STATUS>1</DISP_STATUS>
         </DISPATCH>
      </DISPATCHES>
      <TRANSACTIONS>
         <TRANSACTION>
            <TYPE>0</TYPE>
            <MASTER_CODE>AŞI0008</MASTER_CODE>
            <QUANTITY>1</QUANTITY>
            <PRICE>24</PRICE>
            <TOTAL>24</TOTAL>
            <CURR_PRICE>160</CURR_PRICE>
            <PC_PRICE>24</PC_PRICE>
            <RC_XRATE>1</RC_XRATE>
            <UNIT_CODE>ADET</UNIT_CODE>
            <UNIT_CONV1>1</UNIT_CONV1>
            <UNIT_CONV2>1</UNIT_CONV2>
            <VAT_INCLUDED>1</VAT_INCLUDED>
            <VAT_BASE>24</VAT_BASE>
            <BILLED>1</BILLED>
            <TOTAL_NET>24</TOTAL_NET>
            <DATA_SITEID>1</DATA_SITEID>
            <DISPATCH_NUMBER>0000000000051667</DISPATCH_NUMBER>
            <DETAILS />
            <DIST_ORD_REFERENCE>0</DIST_ORD_REFERENCE>
            <CAMPAIGN_INFOS>
               <CAMPAIGN_INFO />
            </CAMPAIGN_INFOS>
            <EDT_CURR>160</EDT_CURR>
            <EDT_PRICE>24</EDT_PRICE>
            <ORGLOGOID />
            <DEFNFLDSLIST />
            <MONTH>4</MONTH>
            <YEAR>2017</YEAR>
            <PRCLISTREF>740</PRCLISTREF>
            <PREACCLINES />
         </TRANSACTION>
      </TRANSACTIONS>
      <PAYMENT_LIST>
         <PAYMENT>
            <DATE>05.04.2017</DATE>
            <MODULENR>4</MODULENR>
            <SIGN>1</SIGN>
            <TRCODE>1</TRCODE>
            <TOTAL>24</TOTAL>
            <PROCDATE>05.04.2017</PROCDATE>
            <REPORTRATE>1</REPORTRATE>
            <DISCOUNT_DUEDATE>05.04.2017</DISCOUNT_DUEDATE>
            <PAY_NO>1</PAY_NO>
            <DISCTRLIST />
            <DISCTRDELLIST>0</DISCTRDELLIST>
         </PAYMENT>
      </PAYMENT_LIST>
      <ORGLOGOID />
      <DEFNFLDSLIST />
      <DEDUCTIONPART1>2</DEDUCTIONPART1>
      <DEDUCTIONPART2>3</DEDUCTIONPART2>
      <DATA_LINK_REFERENCE>720683</DATA_LINK_REFERENCE>
      <INTEL_LIST>
         <INTEL />
      </INTEL_LIST>
      <AFFECT_RISK>0</AFFECT_RISK>
      <PREACCLINES />
   </INVOICE>
   <INVOICE DBOP="INS">
      <TYPE>1</TYPE>
      <DATE>05.04.2017</DATE>
      <TIME>389550080</TIME>
      <AUXIL_CODE>1</AUXIL_CODE>
      <ARP_CODE>SATICI001</ARP_CODE>
      <POST_FLAGS>247</POST_FLAGS>
      <VAT_RATE>3</VAT_RATE>
      <TOTAL_DISCOUNTED>24</TOTAL_DISCOUNTED>
      <TOTAL_GROSS>24</TOTAL_GROSS>
      <TOTAL_NET>24</TOTAL_NET>
      <TC_NET>24</TC_NET>
      <RC_XRATE>1</RC_XRATE>
      <RC_NET>24</RC_NET>
      <CREATED_BY>1</CREATED_BY>
      <DATE_CREATED>05.04.2018</DATE_CREATED>
      <HOUR_CREATED>23</HOUR_CREATED>
      <MIN_CREATED>57</MIN_CREATED>
      <SEC_CREATED>51</SEC_CREATED>
      <CURRSEL_TOTALS>2</CURRSEL_TOTALS>
      <DATA_SITEID>1</DATA_SITEID>
      <DISPATCHES>
         <DISPATCH>
            <TYPE>1</TYPE>
            <DATE>05.04.2017</DATE>
            <TIME>389550146</TIME>
            <AUXIL_CODE>1</AUXIL_CODE>
            <ARP_CODE>SATICI001</ARP_CODE>
            <INVOICED>1</INVOICED>
            <TOTAL_DISCOUNTED>24</TOTAL_DISCOUNTED>
            <TOTAL_GROSS>24</TOTAL_GROSS>
            <TOTAL_NET>24</TOTAL_NET>
            <RC_RATE>1</RC_RATE>
            <RC_NET>24</RC_NET>
            <CREATED_BY>1</CREATED_BY>
            <DATE_CREATED>05.04.2018</DATE_CREATED>
            <HOUR_CREATED>23</HOUR_CREATED>
            <MIN_CREATED>57</MIN_CREATED>
            <SEC_CREATED>52</SEC_CREATED>
            <CURRSEL_TOTALS>2</CURRSEL_TOTALS>
            <DATA_SITEID>1</DATA_SITEID>
            <ORIG_NUMBER>0000000000051667</ORIG_NUMBER>
            <ORGLOGOID />
            <DEDUCTIONPART1>2</DEDUCTIONPART1>
            <DEDUCTIONPART2>3</DEDUCTIONPART2>
            <AFFECT_RISK>0</AFFECT_RISK>
            <DISP_STATUS>1</DISP_STATUS>
         </DISPATCH>
      </DISPATCHES>
      <TRANSACTIONS>
         <TRANSACTION>
            <TYPE>0</TYPE>
            <MASTER_CODE>AŞI0008</MASTER_CODE>
            <QUANTITY>1</QUANTITY>
            <PRICE>24</PRICE>
            <TOTAL>24</TOTAL>
            <CURR_PRICE>160</CURR_PRICE>
            <PC_PRICE>24</PC_PRICE>
            <RC_XRATE>1</RC_XRATE>
            <UNIT_CODE>ADET</UNIT_CODE>
            <UNIT_CONV1>1</UNIT_CONV1>
            <UNIT_CONV2>1</UNIT_CONV2>
            <VAT_INCLUDED>1</VAT_INCLUDED>
            <VAT_BASE>24</VAT_BASE>
            <BILLED>1</BILLED>
            <TOTAL_NET>24</TOTAL_NET>
            <DATA_SITEID>1</DATA_SITEID>
            <DISPATCH_NUMBER>0000000000051667</DISPATCH_NUMBER>
            <DETAILS />
            <DIST_ORD_REFERENCE>0</DIST_ORD_REFERENCE>
            <CAMPAIGN_INFOS>
               <CAMPAIGN_INFO />
            </CAMPAIGN_INFOS>
            <EDT_CURR>160</EDT_CURR>
            <EDT_PRICE>24</EDT_PRICE>
            <ORGLOGOID />
            <DEFNFLDSLIST />
            <MONTH>4</MONTH>
            <YEAR>2017</YEAR>
            <PRCLISTREF>740</PRCLISTREF>
            <PREACCLINES />
         </TRANSACTION>
      </TRANSACTIONS>
      <PAYMENT_LIST>
         <PAYMENT>
            <DATE>05.04.2017</DATE>
            <MODULENR>4</MODULENR>
            <SIGN>1</SIGN>
            <TRCODE>1</TRCODE>
            <TOTAL>24</TOTAL>
            <PROCDATE>05.04.2017</PROCDATE>
            <REPORTRATE>1</REPORTRATE>
            <DISCOUNT_DUEDATE>05.04.2017</DISCOUNT_DUEDATE>
            <PAY_NO>1</PAY_NO>
            <DISCTRLIST />
            <DISCTRDELLIST>0</DISCTRDELLIST>
         </PAYMENT>
      </PAYMENT_LIST>
      <ORGLOGOID />
      <DEFNFLDSLIST />
      <DEDUCTIONPART1>2</DEDUCTIONPART1>
      <DEDUCTIONPART2>3</DEDUCTIONPART2>
      <DATA_LINK_REFERENCE>720683</DATA_LINK_REFERENCE>
      <INTEL_LIST>
         <INTEL />
      </INTEL_LIST>
      <AFFECT_RISK>0</AFFECT_RISK>
      <PREACCLINES />
   </INVOICE>


</PURCHASE_INVOICES>

LOGO TIGER KAPANMAMIS FATURALARIN LISTESI

SELECT PAYTRANS.CARDREF, PAYTRANS.MODULENR, PAYTRANS.FICHEREF, PAYTRANS.TRCODE, SUM(PAYTRANS.TOTAL) AS FATURA_TOPLAMI, SUM(PAYTRANS.PAID) AS KAPANAN_TUTAR,
SUM(PAYTRANS.TOTAL) - SUM(PAYTRANS.PAID) AS KALAN_TUTAR, CLCARD.CODE, CLCARD.DEFINITION_, CLCARD.TOWN,CLCARD.DISTRICT, CLCARD.TELNRS2, PAYTRANS.PROCDATE AS FATURA_TARIHI,
PAYTRANS.DATE_ AS ODEME_TARIHI,

( SELECT ( SELECT DEFINITION_ FROM lg_001_PAYPLANS WHERE LOGICALREF = PAYDEFREF ) FROM lg_001_03_INVOICE WHERE LOGICALREF = PAYTRANS.FICHEREF ) AS ODEME_PLANI

FROM lg_001_03_PAYTRANS AS PAYTRANS
     LEFT OUTER JOIN lg_001_CLCARD AS CLCARD ON PAYTRANS.CARDREF = CLCARD.LOGICALREF

WHERE PAYTRANS.CARDREF IN ( SELECT LOGICALREF FROM lg_001_CLCARD AS SYN_CLCARD WHERE CODE LIKE '131 %') AND
( SELECT PAYDEFREF FROM lg_001_03_INVOICE WHERE LOGICALREF = PAYTRANS.FICHEREF) IN( 41, 43, 39 ) AND
      PAYTRANS.MODULENR IN( 4 ) AND
      PAYTRANS.PROCDATE <> PAYTRANS.DATE_ AND
      PAYTRANS.DATE_ <= '2016-10-11 00:00:00.000'

GROUP BY PAYTRANS.CARDREF, PAYTRANS.MODULENR, PAYTRANS.FICHEREF, PAYTRANS.TRCODE, CLCARD.CODE, CLCARD.DEFINITION_, CLCARD.TOWN,CLCARD.DISTRICT, CLCARD.TELNRS2, PAYTRANS.PROCDATE, PAYTRANS.DATE_

HAVING SUM(PAYTRANS.TOTAL) - SUM(PAYTRANS.PAID) > 0.99

ORDER BY PAYTRANS.CARDREF;