Transaction still display "Transferred" but in Others Tab Transfer to is Blank/ Already un-transfer

Created by Cheng Kah Poh, Modified on Wed, 31 Jan at 2:17 PM by Cheng Kah Poh




To Verify Which Transactions have above Scenario.


Good Received Note:

select GD.Transferred , G.Transfertoinfo,G.GoodsReceivedNoteCode from GoodsReceivedNoteDetails GD

Join GoodsReceivedNotes G

ON GD.GoodsReceivedNoteId=G.id

where GoodsReceivedNoteId in (select id from GoodsReceivedNotes G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0

order by G.GoodsReceivedNoteCode asc



Select PT.Id, GD.Transferred, G.GoodsReceivedNoteCode from purchasetransferlink PT

join GoodsReceivedNoteDetails GD

ON PT.GoodsReceivedNoteDetail = GD.Id

Left JOIN GoodsReceivedNotes G

ON GD.GoodsReceivedNoteId = G.id

where GD.GoodsReceivedNoteId in (Select id from GoodsReceivedNotes where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0

order by G.GoodsReceivedNoteCode asc


Purchase Order:


select GD.Transferred , G.Transfertoinfo,G.PurchaseOrderCode from PurchaseOrderDetails GD

Join PurchaseOrders G

ON GD.PurchaseOrderid=G.id

where PurchaseOrderId in (select id from PurchaseOrders G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0

order by G.PurchaseOrderCode asc



Select PT.Id, GD.Transferred, G.PurchaseOrderCode from purchasetransferlink PT

join PurchaseOrderDetails GD

ON PT.PurchaseOrderDetail = GD.Id

Left JOIN PurchaseOrders G

ON GD.PurchaseOrderId = G.id

where GD.PurchaseOrderId in (Select id from PurchaseOrders where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0

order by G.PurchaseOrderCode asc


Purchase Requisitions:


select GD.Transferred , G.Transfertoinfo,G.PurchaseRequisitionCode from PurchaseRequisitionDetails GD

Join PurchaseRequisitions G

ON GD.PurchaseRequisitionid=G.id

where PurchaseRequisitionId in (select id from PurchaseRequisitions G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0

order by G.PurchaseRequisitionCode asc



Select PT.Id, GD.Transferred, G.PurchaseRequisitionCode from purchasetransferlink PT

join PurchaseRequisitionDetails GD

ON PT.PurchaseRequisitionDetail = GD.Id

Left JOIN PurchaseRequisitions G

ON GD.PurchaseRequisitionId = G.id

where GD.PurchaseRequisitionId in (Select id from PurchaseRequisitions where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0

order by G.PurchaseRequisitionCode asc


Delivery Orders:

select GD.Transferred , G.Transfertoinfo,G.DeliveryOrderCode

from Salestransferlink PT

join DeliveryOrderDetails GD

ON PT.DeliveryOrderDetail = GD.Id

Left JOIN DeliveryOrders G

ON GD.DeliveryOrderId = G.id

where GD.DeliveryOrderId in (Select id from DeliveryOrders where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0



select GD.Transferred , G.Transfertoinfo,G.DeliveryOrderCode

from DeliveryOrderDetails GD

Join DeliveryOrders G

ON GD.DeliveryOrderId=G.id

where DeliveryOrderId in (select id from DeliveryOrders G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0


Sales Orders:


select GD.Transferred , G.Transfertoinfo,G.SalesOrderCode

from Salestransferlink PT

join SalesOrderDetails GD

ON PT.SalesOrderDetail = GD.Id

Left JOIN SalesOrders G

ON GD.SalesOrderId = G.id

where GD.SalesOrderId in (Select id from SalesOrders where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0



select GD.Transferred , G.Transfertoinfo,G.SalesOrderCode

from SalesOrderDetails GD

Join SalesOrders G

ON GD.SalesOrderId=G.id

where SalesOrderId in (select id from SalesOrders G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0


Quotations:


select GD.Transferred , G.Transfertoinfo,G.QuotationCode

from Salestransferlink PT

join QuotationDetails GD

ON PT.SalesOrderDetail = GD.Id

Left JOIN Quotations G

ON GD.QuotationId = G.id

where GD.QuotationId in (Select id from Quotations where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0



select GD.Transferred , G.Transfertoinfo,G.QuotationCode

from QuotationDetails GD

Join Quotations G

ON GD.QuotationId=G.id

where QuotationId in (select id from Quotations G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0



In Order to Remove on those incorrect Result, from Transferred Field, and Transfer Link


NOTE: Please follow the Sequence number, and DO BACKUP 1st Before Proceed.


Goods Received Note:


---1st

delete PT

from purchasetransferlink PT

join GoodsReceivedNoteDetails GD

ON PT.GoodsReceivedNoteDetail = GD.Id

Left JOIN GoodsReceivedNotes G

ON GD.GoodsReceivedNoteId = G.id

where GD.GoodsReceivedNoteId in (Select id from GoodsReceivedNotes where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0


---2nd

update GD set transferred = 0

from GoodsReceivedNoteDetails GD

Join GoodsReceivedNotes G

ON GD.GoodsReceivedNoteId=G.id

where GoodsReceivedNoteId in (select id from GoodsReceivedNotes G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0


Purchase Orders:


---1st

delete PT

from purchasetransferlink PT

join PurchaseOrderDetails GD

ON PT.PurchaseOrderDetail = GD.Id

Left JOIN PurchaseOrders G

ON GD.PurchaseOrderId = G.id

where GD.PurchaseOrderId in (Select id from PurchaseOrders where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0


---2nd

update GD set transferred = 0

from PurchaseOrderDetails GD

Join PurchaseOrders G

ON GD.PurchaseOrderId=G.id

where PurchaseOrderId in (select id from PurchaseOrders G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0


Purchase RequisitionDetails:


---1st

Delete PT

from purchasetransferlink PT

join PurchaseRequisitionDetails GD

ON PT.PurchaseRequisitionDetail = GD.Id

Left JOIN PurchaseRequisitions G

ON GD.PurchaseRequisitionId = G.id

where GD.PurchaseRequisitionId in (Select id from PurchaseRequisitions where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0


---2nd

update GD set transferred = 0

from PurchaseRequisitionDetails GD

Join PurchaseRequisitions G

ON GD.PurchaseRequisitionid=G.id

where PurchaseRequisitionId in (select id from PurchaseRequisitions G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0



Delivery Orders:


---1st

delete PT

from Salestransferlink PT

join DeliveryOrderDetails GD

ON PT.DeliveryOrderDetail = GD.Id

Left JOIN DeliveryOrders G

ON GD.DeliveryOrderId = G.id

where GD.DeliveryOrderId in (Select id from DeliveryOrders where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0


---2nd

update GD set transferred = 0

from DeliveryOrderDetails GD

Join DeliveryOrders G

ON GD.DeliveryOrderId=G.id

where DeliveryOrderId in (select id from DeliveryOrders G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0


Sales Orders:


---1st

delete PT

from Salestransferlink PT

join SalesOrderDetails GD

ON PT.SalesOrderDetail = GD.Id

Left JOIN SalesOrders G

ON GD.SalesOrderId = G.id

where GD.SalesOrderId in (Select id from SalesOrders where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0


---2nd

update GD set transferred = 0

from SalesOrderDetails GD

Join SalesOrders G

ON GD.SalesOrderId=G.id

where SalesOrderId in (select id from SalesOrders G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0


Quotations:


---1st

delete PT

from Salestransferlink PT

join QuotationDetails GD

ON PT.SalesOrderDetail = GD.Id

Left JOIN Quotations G

ON GD.QuotationId = G.id

where GD.QuotationId in (Select id from Quotations where TransferToInfo = '' or TransferToInfo is null)

and GD.Transferred !=0


---2nd

update GD set transferred = 0

from QuotationDetails GD

Join Quotations G

ON GD.QuotationId=G.id

where QuotationId in (select id from Quotations G where TransferToInfo ='' or TransferToInfo is null)

and transferred != 0



** Learn more about Azure Cloud

** Learn more about QNE Hybrid Cloud Software


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article