Last active
January 8, 2023 12:06
-
-
Save itsyosefali/d5435382f03e06dc494923be5255aec3 to your computer and use it in GitHub Desktop.
تقرير تثبيت ال item group بناء على حركة المبيعات وفقا للcost center
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select | |
| `tabSales Invoice`.branch, | |
| sum(case when `tabItem`.item_group = 'موكيت' then `tabSales Invoice Item`.qty else 0 end) AS موكيت, | |
| sum(case when `tabItem`.item_group = 'ممرات' then `tabSales Invoice Item`.qty else 0 end) as 'ممرات', | |
| sum(case when `tabItem`.item_group = 'كولا' then `tabSales Invoice Item`.qty else 0 end) as كولا, | |
| sum(case when `tabItem`.item_group = 'سجاد' then `tabSales Invoice Item`.qty else 0 end) as 'سجاد', | |
| sum(case when `tabItem`.item_group = 'دواسات' then `tabSales Invoice Item`.qty else 0 end) as دواسات | |
| from `tabSales Invoice Item` | |
| INNER JOIN `tabSales Invoice` | |
| on `tabSales Invoice`.name = `tabSales Invoice Item`.parent | |
| INNER JOIN `tabItem` | |
| on `tabItem`.name = `tabSales Invoice Item`.item_code | |
| Group By | |
| `tabSales Invoice`.branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment