@things-factory/operato-pms 4.3.359 → 4.3.360

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,10 +42,10 @@ exports.dailyProductionReports = {
42
42
  CREATE TEMP TABLE temp_records on commit drop AS (
43
43
  select blk.block_id, coalesce(sum(field_bunches),0) AS today_field_bunches,
44
44
  round(coalesce(sum(ramp_weight),0)::numeric,4) AS today_ramp_weight,
45
- sum(case when transaction_type = 'HARVEST' OR transaction_type = 'BUNCHES_ADJUSTMENT' then field_bunches else 0 end) as today_bunch_harvest,
46
- sum(case when transaction_type = 'LOADING' OR transaction_type = 'LOADING_ADJUSTMENT' then -field_bunches else 0 end) as today_bunch_collected,
47
- round(sum(case when transaction_type = 'LOADING' OR transaction_type = 'LOADING_ADJUSTMENT' then ramp_weight else 0 end)::numeric,4) as today_ramp_weight_collected,
48
- round(sum(case when transaction_type = 'DISPATCHMENT' OR transaction_type = 'DISPATCHMENT_ADJUSTMENT' then -ramp_weight else 0 end)::numeric,4) as today_weight_dispatch,
45
+ sum(case when transaction_type = 'HARVEST' then field_bunches else 0 end) as today_bunch_harvest,
46
+ sum(case when transaction_type = 'LOADING' then -field_bunches else 0 end) as today_bunch_collected,
47
+ round(sum(case when transaction_type = 'LOADING' then ramp_weight else 0 end)::numeric,4) as today_ramp_weight_collected,
48
+ round(sum(case when transaction_type = 'DISPATCHMENT' then -ramp_weight else 0 end)::numeric,4) as today_weight_dispatch,
49
49
  transaction_date
50
50
  from record_transactions t2
51
51
  inner join temp_blocks blk on blk.id = t2.block_id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-pms",
3
- "version": "4.3.359",
3
+ "version": "4.3.360",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -95,5 +95,5 @@
95
95
  "devDependencies": {
96
96
  "@things-factory/builder": "^4.3.281"
97
97
  },
98
- "gitHead": "eee64e58c1eae1ce3bbb02b1413f7fee09578498"
98
+ "gitHead": "f1684569edf03f80ec368c81d78906e275c0478c"
99
99
  }
@@ -52,10 +52,10 @@ export const dailyProductionReports = {
52
52
  CREATE TEMP TABLE temp_records on commit drop AS (
53
53
  select blk.block_id, coalesce(sum(field_bunches),0) AS today_field_bunches,
54
54
  round(coalesce(sum(ramp_weight),0)::numeric,4) AS today_ramp_weight,
55
- sum(case when transaction_type = 'HARVEST' OR transaction_type = 'BUNCHES_ADJUSTMENT' then field_bunches else 0 end) as today_bunch_harvest,
56
- sum(case when transaction_type = 'LOADING' OR transaction_type = 'LOADING_ADJUSTMENT' then -field_bunches else 0 end) as today_bunch_collected,
57
- round(sum(case when transaction_type = 'LOADING' OR transaction_type = 'LOADING_ADJUSTMENT' then ramp_weight else 0 end)::numeric,4) as today_ramp_weight_collected,
58
- round(sum(case when transaction_type = 'DISPATCHMENT' OR transaction_type = 'DISPATCHMENT_ADJUSTMENT' then -ramp_weight else 0 end)::numeric,4) as today_weight_dispatch,
55
+ sum(case when transaction_type = 'HARVEST' then field_bunches else 0 end) as today_bunch_harvest,
56
+ sum(case when transaction_type = 'LOADING' then -field_bunches else 0 end) as today_bunch_collected,
57
+ round(sum(case when transaction_type = 'LOADING' then ramp_weight else 0 end)::numeric,4) as today_ramp_weight_collected,
58
+ round(sum(case when transaction_type = 'DISPATCHMENT' then -ramp_weight else 0 end)::numeric,4) as today_weight_dispatch,
59
59
  transaction_date
60
60
  from record_transactions t2
61
61
  inner join temp_blocks blk on blk.id = t2.block_id