{"id":10257,"date":"2020-08-15T08:12:17","date_gmt":"2020-08-15T07:12:17","guid":{"rendered":"http:\/\/help.sdna.lu\/?p=10257"},"modified":"2022-12-18T11:07:55","modified_gmt":"2022-12-18T10:07:55","slug":"query-select-client-invoice-details-with-missing-stock-movements-for-article-components","status":"publish","type":"post","link":"https:\/\/sdna.lu\/?p=10257","title":{"rendered":"Query Select client invoice details with missing stock movements for article components"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><code>Select [InvoiceT].[Number], [invoiceT].[Date]<br>from ((([InvoiceTDetail] LEFT JOIN [StockTransfer]<br>ON ([InvoiceTDetail].[Id] = [StockTransfer].[InvoiceTDetailId] and [StockTransfer].[DBId] = 1))<br>INNER JOIN [InvoiceT]<br>ON ([InvoiceTDetail].[InvoiceTId] = [InvoiceT].[Id] and [InvoiceT].[DBId] = 1))<br>INNER JOIN [Article]<br>ON ([InvoiceTDetail].[ArticleId] = [Article].[Id] and [Article].[DBId] = 1))<br>where [InvoiceTDetail].[DBId] = 1<br>and [InvoiceTDetail].[ArticleId] in<br>(Select OrgArticleId from articlecomponent where [DBId] = 1 and [DestArticleId] = 4 and [Sell] = 1)<br>and [StockTransfer].[DBId] Is Null<br>order by [InvoiceT].[Date]<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Select [InvoiceT].[Number], [invoiceT].[Date]from ((([InvoiceTDetail] LEFT JOIN [StockTransfer]ON ([InvoiceTDetail].[Id] = [StockTransfer].[InvoiceTDetailId] and [StockTransfer].[DBId] = 1))INNER JOIN [InvoiceT]ON ([InvoiceTDetail].[InvoiceTId] = [InvoiceT].[Id] and [InvoiceT].[DBId] = 1))INNER JOIN [Article]ON ([InvoiceTDetail].[ArticleId] = [Article].[Id] and [Article].[DBId] = 1))where [InvoiceTDetail].[DBId] = 1and [InvoiceTDetail].[ArticleId] in(Select OrgArticleId from articlecomponent where [DBId] = 1 and [DestArticleId] = 4 and [Sell] = 1)and [StockTransfer].[DBId] Is Nullorder [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[487],"tags":[153],"class_list":["post-10257","post","type-post","status-publish","format-standard","hentry","category-query","tag-query"],"_links":{"self":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/10257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10257"}],"version-history":[{"count":5,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/10257\/revisions"}],"predecessor-version":[{"id":10263,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/10257\/revisions\/10263"}],"wp:attachment":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}