اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

برجاء الاهتمام اريد التعديل على هذا الاستعلام


henototy

الردود الموصى بها

لدى هذا الاستعلام وهو

SELECT Z_PAYREC.remark as remark, Z_PAYREC.cash, Z_PAYREC.TTYPE AS TTYPE , Z_PAYREC.SER AS SER ,Z_PAYREC.DocNo AS TNO, Z_PAYREC.DocDate AS TDATE, Z_PAYREC.Amount AS TOT, Z_PAYREC.Discount AS DISC, Z_PAYREC.Posted AS POST , Z_PAYREC.Contact AS MCODE, YEAR(Z_PAYREC.DocDate) AS FYEAR,Z_PAYREC.DocType AS a1,Z_PAYREC.DocType AS a2 , IIF (a1 =2,Amount -Discount ,0) AS DEB , IIF (a1 = 1,Amount -Discount ,0) AS CRD , IIF (a2 =2,"سند صرف " ,iif(a2 =1,"سند قبض ")) AS desc11 FROM Z_PAYREC WHERE Z_PAYREC.Posted =-1 AND Z_PAYREC.cash =-1 AND (DOCDATE >= [Forms]![frm_cashare1]![FDATE] ) AND (DOCDATE <= [Forms]![frm_cashare1]![TDATE0] ); UNION ALL SELECT Z_TRANS_H.remark as remark ,Z_TRANS_H.cash, Z_TRANS_H.TTYPE AS TTYPE, Z_TRANS_H.SER AS SER ,Z_TRANS_H.TranNo AS TNO, Z_TRANS_H.TranDate AS TDATE, Z_TRANS_H.Total AS TOT, Z_TRANS_H.Discount AS DISC, Z_TRANS_H.Posted AS POST , Z_TRANS_H.Contact AS MCODE, YEAR ( Z_TRANS_H.TranDate) AS FYEAR, Z_TRANS_H.Typ AS a1, Z_TRANS_H.Typ AS a2 , IIF (TYP IN (3,5,6) ,TOTAL -Discount ,0) AS DEB , IIF (TYP IN (1,2,7) ,TOTAL -Discount ,0) AS CRD , IIF (TYP =1,"فاتورة مشتريات " ,iif(typ=3,"فاتورة مرتجعات لمورد ", iif(typ=5,"فاتورة مبيعات ",iif( typ=7,"فاتورة مرتجعات من عميل ","- "))))+iif(cash," نقدية "," ") AS desc11 FROM Z_TRANS_H WHERE Z_TRANS_H.Posted =-1 AND Z_TRANS_H.cash =-1 AND (TranDate >= [Forms]![frm_cashare1]![FDATE] ) AND (TranDate <= [Forms]![frm_cashare1]![TDATE0] )

ORDER BY TDATE, TTYPE, SER;

ماريده ان يظهر الكل بدون السندات الخاصة بالمشتريات والمبيعات

يارب تساعدونى فى هذه المشكلة

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information