@feedmepos/mf-report 5.35.0 → 5.35.1

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.
Files changed (40) hide show
  1. package/dist/{App-Dv36-JBr.js → App-DymsgzRk.js} +5 -5
  2. package/dist/{DateRangeSelect-CSuWTBDR.js → DateRangeSelect-EyFOS5YN.js} +2 -2
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BFuav3fL.js → Default.vue_vue_type_script_setup_true_lang-DR00UPAF.js} +2 -2
  4. package/dist/{DigestListView-lWXR-Yqe.js → DigestListView-Bqfvh-HJ.js} +5 -5
  5. package/dist/{DigestReaderView-cKRrj4qw.js → DigestReaderView-C2LLt5Os.js} +6 -6
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-D0OTyDep.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CG6e_gzi.js} +175 -175
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-lFm4G3pA.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CDVTzFgy.js} +86 -86
  8. package/dist/{InsightView-BO2y0s6E.js → InsightView-DuKZSkwX.js} +7 -7
  9. package/dist/{Integration-DZR0sg3Y.js → Integration-CsNHPYFj.js} +4 -4
  10. package/dist/{Integrations-C8IJSs8_.js → Integrations-D3WKXf51.js} +4 -4
  11. package/dist/{Layout-DKE_UPyV.js → Layout-BjmSSX_t.js} +1 -1
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-pKBQdsry.js → LocationSelect.vue_vue_type_script_setup_true_lang-B1l8lX9B.js} +3 -3
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DsTCV4je.js → MenuTab.vue_vue_type_script_setup_true_lang-BB6oCrSY.js} +5 -5
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-uFKb4Unh.js → NavigationTab.vue_vue_type_script_setup_true_lang-MU23ZpS-.js} +7 -7
  15. package/dist/{OverviewView--6juk8Ny.js → OverviewView-CPGvc7ai.js} +6 -6
  16. package/dist/{Report-B7tYzV-u.js → Report-pV0cutLQ.js} +4 -4
  17. package/dist/{ReportCanvasView-DJZItxK4.js → ReportCanvasView-DIbh7jfm.js} +6 -6
  18. package/dist/{ReportEditor-lP1wy7eF.js → ReportEditor-DzNm2lco.js} +9 -9
  19. package/dist/{ReportView-BFdf3j2m.js → ReportView-snhO75LM.js} +8 -8
  20. package/dist/{ReportViewRoute-D5tZcb3A.js → ReportViewRoute-B2EqiToP.js} +2 -2
  21. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-Cxx-TQz9.js → SelectComponent.vue_vue_type_script_setup_true_lang-D8f9NgeK.js} +1 -1
  22. package/dist/{Setting-CdOGOX1H.js → Setting-CQv2TfFl.js} +5 -5
  23. package/dist/{Template-CcNz2aVR.js → Template-D2V4D103.js} +5 -5
  24. package/dist/TileEditor-BSo6XBio.js +4197 -0
  25. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-D2Tz0EW3.js → TilePageStack.vue_vue_type_script_setup_true_lang-Dv8AbusW.js} +3 -3
  26. package/dist/{TransitionFade-qKsTOksI.js → TransitionFade-Pp1yGBHT.js} +7 -7
  27. package/dist/_plugin-vue_export-helper-N63MbPK5.js +2905 -0
  28. package/dist/{app-D9WJwZyu.js → app-DovA8wu5.js} +16 -15
  29. package/dist/app.js +1 -1
  30. package/dist/assets/{formatChartData.worker-Bt8turfo.js → formatChartData.worker-CQS_7KcL.js} +26 -23
  31. package/dist/assets/{processTableData.worker-MGb36f8J.js → processTableData.worker-OuexVqV8.js} +26 -23
  32. package/dist/{currency-Dx3wVA1Q.js → currency-BuBigNK4.js} +1 -1
  33. package/dist/{index-c2QQydke.js → index-B-TPuqE4.js} +27 -24
  34. package/dist/{report-tffVXl4d.js → report-B7mn0l-p.js} +1 -1
  35. package/dist/{useDigestFont-DfORxCFz.js → useDigestFont-BfYA1Gac.js} +2 -2
  36. package/dist/{useReportCanvasPicks-D1IdA31H.js → useReportCanvasPicks-BXxoQ2_p.js} +4 -4
  37. package/dist/{useRestaurantPermission-CrqMkVed.js → useRestaurantPermission-B7Js_cb-.js} +2 -2
  38. package/package.json +2 -2
  39. package/dist/TileEditor-D8QsUytE.js +0 -4183
  40. package/dist/_plugin-vue_export-helper-Bx7s49ra.js +0 -2828
@@ -7851,6 +7851,7 @@ const fu = "__DEFAULT__", gu = [
7851
7851
  "Asia/Kuala_Lumpur",
7852
7852
  "Asia/Macau",
7853
7853
  "Asia/Makassar",
7854
+ "Asia/Manila",
7854
7855
  "Asia/Singapore",
7855
7856
  "Asia/Bangkok",
7856
7857
  "Asia/Tokyo",
@@ -7869,7 +7870,7 @@ function Ni(e) {
7869
7870
  }
7870
7871
  function _p(e) {
7871
7872
  var o;
7872
- return `${((o = e.split("/").pop()) == null ? void 0 : o.replace(/_/g, " ")) ?? e} (UTC${Ni(e)})`;
7873
+ return `${((o = e.split("/").pop()) == null ? void 0 : o.replaceAll("_", " ")) ?? e} (UTC${Ni(e)})`;
7873
7874
  }
7874
7875
  function $p(e, t = (o) => `${o} (Default)`) {
7875
7876
  return [
@@ -9744,7 +9745,7 @@ const vp = [
9744
9745
  path: "/overview",
9745
9746
  alias: ["/"],
9746
9747
  name: "overview",
9747
- component: Mt(() => import("./OverviewView--6juk8Ny.js")),
9748
+ component: Mt(() => import("./OverviewView-CPGvc7ai.js")),
9748
9749
  meta: {
9749
9750
  validationManifest: St(
9750
9751
  h.report_accessOverview
@@ -9755,7 +9756,7 @@ const vp = [
9755
9756
  // the digest carries the landing page's permission
9756
9757
  path: "/digest",
9757
9758
  name: "digest",
9758
- component: Mt(() => import("./DigestListView-lWXR-Yqe.js")),
9759
+ component: Mt(() => import("./DigestListView-Bqfvh-HJ.js")),
9759
9760
  meta: {
9760
9761
  contexts: to,
9761
9762
  validationManifest: St(
@@ -9766,7 +9767,7 @@ const vp = [
9766
9767
  {
9767
9768
  path: "/digest/:weekStart(\\d{4}-\\d{2}-\\d{2})",
9768
9769
  name: "digestReader",
9769
- component: Mt(() => import("./DigestReaderView-cKRrj4qw.js")),
9770
+ component: Mt(() => import("./DigestReaderView-C2LLt5Os.js")),
9770
9771
  meta: {
9771
9772
  contexts: to,
9772
9773
  validationManifest: St(
@@ -9777,18 +9778,18 @@ const vp = [
9777
9778
  {
9778
9779
  path: "/report",
9779
9780
  name: "reports",
9780
- component: () => import("./Report-B7tYzV-u.js")
9781
+ component: () => import("./Report-pV0cutLQ.js")
9781
9782
  },
9782
9783
  {
9783
9784
  path: "/template",
9784
9785
  name: "template",
9785
- component: () => import("./Template-CcNz2aVR.js"),
9786
+ component: () => import("./Template-D2V4D103.js"),
9786
9787
  beforeEnter: () => qi().canAccessTemplate() ? !0 : { name: "reports" }
9787
9788
  },
9788
9789
  {
9789
9790
  path: "/insights",
9790
9791
  name: "insights",
9791
- component: Mt(() => import("./InsightView-BO2y0s6E.js")),
9792
+ component: Mt(() => import("./InsightView-DuKZSkwX.js")),
9792
9793
  meta: {
9793
9794
  contexts: to,
9794
9795
  validationManifest: St(
@@ -9799,7 +9800,7 @@ const vp = [
9799
9800
  {
9800
9801
  path: "/report-view",
9801
9802
  name: "reportView",
9802
- component: () => import("./ReportViewRoute-D5tZcb3A.js")
9803
+ component: () => import("./ReportViewRoute-B2EqiToP.js")
9803
9804
  },
9804
9805
  {
9805
9806
  // canvas reports used to live here; existing links and scheduled emails still carry it
@@ -9809,17 +9810,17 @@ const vp = [
9809
9810
  {
9810
9811
  path: "/report-editor",
9811
9812
  name: "reportEditor",
9812
- component: () => import("./ReportEditor-lP1wy7eF.js")
9813
+ component: () => import("./ReportEditor-DzNm2lco.js")
9813
9814
  },
9814
9815
  {
9815
9816
  path: "/report-editor/tile-editor",
9816
9817
  name: "tileEditor",
9817
- component: () => import("./TileEditor-D8QsUytE.js")
9818
+ component: () => import("./TileEditor-BSo6XBio.js")
9818
9819
  },
9819
9820
  {
9820
9821
  path: "/setting",
9821
9822
  name: "setting",
9822
- component: Mt(() => import("./Setting-CdOGOX1H.js")),
9823
+ component: Mt(() => import("./Setting-CQv2TfFl.js")),
9823
9824
  meta: {
9824
9825
  validationManifest: St(
9825
9826
  h.report_accessSetting
@@ -9828,7 +9829,7 @@ const vp = [
9828
9829
  },
9829
9830
  {
9830
9831
  path: "/integration",
9831
- component: Mt(() => import("./Layout-DKE_UPyV.js")),
9832
+ component: Mt(() => import("./Layout-BjmSSX_t.js")),
9832
9833
  meta: {
9833
9834
  contexts: to,
9834
9835
  validationManifest: St(
@@ -9839,12 +9840,12 @@ const vp = [
9839
9840
  {
9840
9841
  name: "integrations",
9841
9842
  path: "",
9842
- component: () => import("./Integrations-C8IJSs8_.js")
9843
+ component: () => import("./Integrations-D3WKXf51.js")
9843
9844
  },
9844
9845
  {
9845
9846
  name: "integration",
9846
9847
  path: "/integration/:id",
9847
- component: () => import("./Integration-DZR0sg3Y.js")
9848
+ component: () => import("./Integration-CsNHPYFj.js")
9848
9849
  }
9849
9850
  ]
9850
9851
  },
@@ -9864,7 +9865,7 @@ const vp = [
9864
9865
  routes: vp
9865
9866
  });
9866
9867
  wp.beforeEach(hp);
9867
- const Tf = ba(() => import("./App-Dv36-JBr.js"));
9868
+ const Tf = ba(() => import("./App-DymsgzRk.js"));
9868
9869
  export {
9869
9870
  yf as $,
9870
9871
  eu as A,
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { am as e, ag as m, an as o } from "./app-D9WJwZyu.js";
2
+ import { am as e, ag as m, an as o } from "./app-DovA8wu5.js";
3
3
  export {
4
4
  e as FmApp,
5
5
  m as i18nMessages,
@@ -114,29 +114,32 @@ then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_a
114
114
  from (
115
115
  select
116
116
  *,
117
- to_char(
118
- (
119
- coalesce(effective_at, created_at)
120
- at time zone @TIMEZONE
121
- )::date,
122
- 'YYYYMMDD'
123
- )
124
- || '-'
125
- || lpad(
126
- row_number() over (
127
- partition by
128
- location_id,
129
- (
130
- coalesce(effective_at, created_at)
131
- at time zone @TIMEZONE
132
- )::date
133
- order by
134
- coalesce(effective_at, created_at),
135
- id
136
- )::text,
137
- 4,
138
- '0'
139
- ) as formatted_id
117
+ case when closing_id is not null then
118
+ to_char(
119
+ (
120
+ coalesce(effective_at, created_at)
121
+ at time zone @TIMEZONE
122
+ )::date,
123
+ 'YYYYMMDD'
124
+ )
125
+ || '-'
126
+ || lpad(
127
+ row_number() over (
128
+ partition by
129
+ location_id,
130
+ (
131
+ coalesce(effective_at, created_at)
132
+ at time zone @TIMEZONE
133
+ )::date,
134
+ closing_id is null
135
+ order by
136
+ coalesce(effective_at, created_at),
137
+ id
138
+ )::text,
139
+ 4,
140
+ '0'
141
+ )
142
+ end as formatted_id
140
143
  from closing_drafts
141
144
  ) t
142
145
  `,a,a,i,!0,l,u.List_empty1,i,p)}),e(m,"closingDraftSkuSchema","$get$closingDraftSkuSchema",()=>{var a="couchdb_closing_draft",i="createdAt",s=null,l=t.Source_Source$couchdb("skus","closingDraft"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId"),t.Permission_Permission$warehouse("warehouseId")],d.JSArray_Permission),i),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),s,s,s),t.Index$(t._setArrayType(["doc_id"],_),s,s,s),t.Index$(t._setArrayType(["published_at"],_),s,s,s),t.Index$(t._setArrayType(["location_id","created_at"],_),"idx_cds_select_index",s,s),t.Index$(t._setArrayType(["closing_adjustment_id","sku_id"],_),"idx_cds_closing_sku_index",s,s)],d.JSArray_Index);return t.Schema_Schema$build(!1,"inventory",u.List_empty,3,s,t._setArrayType(["restaurantId"],_),s,new t.closingDraftSkuSchema_closure,u.List_empty0,s,M,s,!0,!0,!1,!1,!0,!1,new t.closingDraftSkuSchema_closure0,"Closing draft sku","closing_draft_skus","closing_draft_sku",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_27,i,s,a,a,s,!0,l,u.List_empty1,s,p)}),e(m,"closingSkuSchema","$get$closingSkuSchema",()=>{var a="couchdb_closing",i="createdAt",s=null,l=t.Source_Source$couchdb("skus","closing"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId"),t.Permission_Permission$warehouse("warehouseId")],d.JSArray_Permission),i),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),s,s,s),t.Index$(t._setArrayType(["doc_id"],_),s,s,s),t.Index$(t._setArrayType(["created_at"],_),s,s,s),t.Index$(t._setArrayType(["location_id"],_),s,s,s),t.Index$(t._setArrayType(["published_at"],_),s,s,s)],d.JSArray_Index),b=t._setArrayType(["restaurantId"],_);return t.Schema_Schema$build(!1,"inventory",t._setArrayType(["closing","stock take","physical count","stocktake"],_),2,s,b,"Physical stock-take count per SKU per closing session.",new t.closingSkuSchema_closure,u.List_empty0,s,M,s,!0,!0,!1,!1,!1,!1,new t.closingSkuSchema_closure0,"Closing sku","closing_skus","closing_sku",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_25,i,s,a,a,s,!0,l,u.List_empty1,s,p)}),e(m,"collectibleCollectionSchema","$get$collectibleCollectionSchema",()=>{var a="mongodb_marketing_db_collections",i=null,s="createdAt",l=t.Source_Source$mongodb(i,"Collections"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId")],d.JSArray_Permission),s),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),i,i,i),t.Index$(t._setArrayType(["doc_id"],_),i,i,i),t.Index$(t._setArrayType(["created_at"],_),i,i,i),t.Index$(t._setArrayType(["business_id"],_),i,i,i),t.Index$(t._setArrayType(["user_id","type"],_),i,i,i)],d.JSArray_Index);return t.Schema_Schema$build(!1,"loyalty",u.List_empty,3,i,t._setArrayType([],_),"One row per holding of a collectible: VOUCHER and GAME get one row per issued item, carrying its code and max_use, while every other kind keeps one active row per member per collectible. type is the kind, labelled as in collectible_config. There is no balance column — the running balance of a stackable kind is to_balance on its latest collectible_transaction, and expiry, applied time and applied count are read back from those transactions too. created_at is when the holding was created; join member for the holder.",new t.collectibleCollectionSchema_closure,u.List_empty0,i,M,i,!0,!0,!1,!1,!1,!1,new t.collectibleCollectionSchema_closure0,"Collectible collection","collectible_collections","collectible_collection",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_70,s,i,a,a,i,!0,l,u.List_empty1,i,p)}),e(m,"collectibleConfigSchema","$get$collectibleConfigSchema",()=>{var a="mongodb_marketing_db_collectible_configs",i=null,s=t.Source_Source$mongodb(i,"CollectibleConfigs"),l=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId")],d.JSArray_Permission),i),p=d.JSArray_String,_=t._setArrayType([t.Index$(t._setArrayType(["id"],p),i,i,i),t.Index$(t._setArrayType(["doc_id"],p),i,i,i),t.Index$(t._setArrayType(["created_at"],p),i,i,i),t.Index$(t._setArrayType(["business_id"],p),i,i,i)],d.JSArray_Index);return t.Schema_Schema$build(!1,"loyalty",u.List_empty,3,i,t._setArrayType([],p),"One row per collectible a business issues, with its caps. type is the kind — VOUCHER, CREDIT, POINT, COIN, TIER, TITLE, GAME, STAMP or REFERRAL — and the portal labels three of them differently: COIN shows as Point, POINT as Experience, GAME as Token. VOUCHER is the v2 voucher; voucher_claim holds the v1 ones. A master for names and rules: the movements are in collectible_transaction and the holdings in collectible_collection, and it has no time control.",new t.collectibleConfigSchema_closure,u.List_empty0,i,_,i,!0,!0,!1,!1,!1,!1,new t.collectibleConfigSchema_closure0,"Collectible config","collectible_configs","collectible_config",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_65,i,i,a,a,i,!1,s,u.List_empty1,i,l)}),e(m,"collectibleTransactionSchema","$get$collectibleTransactionSchema",()=>{var a="mongodb_marketing_db_transactions",i="createdAt",s=null,l=t.Source_Source$mongodb("amounts","Transactions"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId")],d.JSArray_Permission),i),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),s,s,s),t.Index$(t._setArrayType(["doc_id"],_),s,s,s),t.Index$(t._setArrayType(["created_at"],_),s,s,s),t.Index$(t._setArrayType(["business_id"],_),s,s,s),t.Index$(t._setArrayType(["collection_id"],_),s,s,s),t.Index$(t._setArrayType(["business_id","created_at"],_),"idx_collectible_transactions_select_index",s,s),t.Index$(t._setArrayType(["ref_id"],_),s,s,s),t.Index$(t._setArrayType(["user_id"],_),s,s,s)],d.JSArray_Index);return t.Schema_Schema$build(!1,"loyalty",u.List_empty,3,s,t._setArrayType([],_),"One row per movement of a v2 collectible, granted, used, returned or expired, for every kind — vouchers, credit, stamps and the rest. The row carries no kind: filter on collectible_collection.type or collectible_config.type, where VOUCHER is the v2 voucher and voucher_claim holds the v1 ones. amount already carries its sign, so prefer qty_distributed, qty_usage and qty_expired; transformed_source renames only PORTAL, BENEFIT, CYCLE, BILL and ORDER and passes every other source, such as STORE, CASHBACK, STAMP_REWARD or REFERRAL, through as it is. created_at is when the movement happened, and it joins member, campaign, collectible_config, its collection, and the bill or store transaction in ref_id.",new t.collectibleTransactionSchema_closure,u.List_empty0,s,M,s,!0,!0,!1,!1,!1,!1,new t.collectibleTransactionSchema_closure0,"Collectible transaction","collectible_transactions","collectible_transaction",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_66,i,s,a,a,s,!0,l,u.List_empty1,s,p)}),e(m,"completeTimeBillSchema","$get$completeTimeBillSchema",()=>{var a=null,i=t.Source_Source$couchdb(a,""),s=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),"completedAt");return t.Schema_Schema$build(!1,"sales",u.List_empty,3,a,t._setArrayType(["restaurantId"],d.JSArray_String),"bill keyed by completion time instead of creation time — use only when the question is about when bills completed.",new t.completeTimeBillSchema_closure,u.List_empty0,a,a,a,!0,!1,!1,!1,!1,!1,new t.completeTimeBillSchema_closure0,"Bill (Complete time)","bills","bill",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_1,"createdAt",a,"","",a,!0,i,u.List_empty1,a,s)}),e(m,"counterSchema","$get$counterSchema",()=>{var a="couchdb_counter",i=null,s="createdAt",l=t.Source_Source$couchdb(i,"counter"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),s),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),i,i,i),t.Index$(t._setArrayType(["doc_id"],_),i,i,i),t.Index$(t._setArrayType(["restaurant_id"],_),i,i,i)],d.JSArray_Index),b=t._setArrayType(["restaurantId"],_);return t.Schema_Schema$build(!1,"operations",t._setArrayType(["counter","pos","terminal","register"],_),2,i,b,"POS counter/terminal master, one row per counter. Join it for counter names; not a fact table.",new t.counterSchema_closure,u.List_empty0,i,M,i,!0,!0,!1,!1,!1,!1,new t.counterSchema_closure0,"Counter","counters","counter",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_3,s,i,a,a,i,!0,l,u.List_empty1,i,p)}),e(m,"creditTransactionSchema","$get$creditTransactionSchema",()=>{var a=null,i="createdAt",s=t.Source_Source$mongodb(a,"CreditTransactions"),l=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId"),t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),i),p=d.JSArray_String,_=t._setArrayType([t.Index$(t._setArrayType(["id"],p),a,a,a),t.Index$(t._setArrayType(["doc_id"],p),a,a,a),t.Index$(t._setArrayType(["created_at"],p),a,a,a),t.Index$(t._setArrayType(["restaurant_id"],p),a,a,a),t.Index$(t._setArrayType(["business_id"],p),a,a,a)],d.JSArray_Index),M=t._setArrayType(["restaurantId"],p);return t.Schema_Schema$build(!1,"loyalty",t._setArrayType(["credit","point","reward point","loyalty point"],p),2,t.Canonical$(u.Map_empty,t._setArrayType(["total_amount","normal_amount","free_amount"],p),u.List_empty),M,"Loyalty credit ledger of the older CRM: one row per credit movement on a member. Earn and redeem are both rows here; member holds only the resulting balance. Amounts are in sen, hundredths of the currency unit.",new t.creditTransactionSchema_closure,u.List_empty0,a,_,a,!0,!0,!1,!1,!1,!1,new t.creditTransactionSchema_closure0,"Credit transaction","credit_transactions","credit_transaction",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_54,i,a,"mongodb_credit_transactions","mongodb_company_db_credit_transactions",a,!0,s,u.List_empty1,a,l)}),e(m,"dailyForecastSalesSchema","$get$dailyForecastSalesSchema",()=>{var a,i,s="benchmark_daily_sales_forecast",l="daily_forecast_sales",p="createdAt",_=null,M=d.JSArray_String,b=t._setArrayType(["restaurant_id","forecast_date","training_period","forecast_period","model_version"],M);return b=t.Source_Source$bigquery("feedme_dbt_mart_data",t._setArrayType(["forecast_date"],M),s,"published_at",b),a=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),p),i=t._setArrayType([t.Index$(t._setArrayType(["id"],M),_,_,_),t.Index$(t._setArrayType(["doc_id"],M),_,_,_),t.Index$(t._setArrayType(["restaurant_id","created_at"],M),_,_,_)],d.JSArray_Index),t.Schema_Schema$build(!1,"forecast",u.List_empty,3,_,t._setArrayType(["restaurantId"],M),"One row per outlet per forecast day per model run, where predicted is the forecast sales figure. created_at is the day being forecast, not when the model ran. Rows repeat across training_period, forecast_period and model_version, so pin one combination before summing. Join bill on outlet and day to compare the forecast against actual sales.",new t.dailyForecastSalesSchema_closure,u.List_empty0,_,i,43200,!0,!0,!1,!1,!1,!1,new t.dailyForecastSalesSchema_closure0,"Daily Forecast Sale",l,l,u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_84,p,_,s,s,_,!0,b,u.List_empty1,_,a)}),e(m,"depositSchema","$get$depositSchema",()=>{var a=null,i="createdAt",s=t.Source_Source$mongodb(a,"Deposits"),l=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId"),t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),i),p=d.JSArray_String,_=t._setArrayType([t.Index$(t._setArrayType(["id"],p),a,a,a),t.Index$(t._setArrayType(["doc_id"],p),a,a,a),t.Index$(t._setArrayType(["created_at"],p),a,a,a),t.Index$(t._setArrayType(["business_id"],p),a,a,a),t.Index$(t._setArrayType(["restaurant_id"],p),a,a,a),t.Index$(t._setArrayType(["restaurant_id","created_at"],p),"idx_deposits_select_index",a,a),t.Index$(t._setArrayType(["applied_bill_id"],p),a,a,a)],d.JSArray_Index);return t.Schema_Schema$build(!1,"sales",u.List_empty,3,a,t._setArrayType(["restaurantId"],p),"One row per customer deposit taken for a booking: what was collected, applied to a bill, refunded, forfeited or left outstanding. Answers deposit liability through outstanding_amount and deposit income through deposit_income_amount, the money kept that never reaches a bill. created_at is when the deposit was raised; deposit_transaction is the per-event timeline, and applied_bill_id joins the bill the deposit was spent on.",new t.depositSchema_closure,u.List_empty0,a,_,a,!0,!0,!1,!1,!1,!1,new t.depositSchema_closure0,"Deposit","deposits","deposit",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_116,i,a,"mongodb_deposits","mongodb_company_db_deposits",a,!0,s,t._setArrayType([t.Split$(t._setArrayType(["applied_amount","cash_out_amount","deposit_income_amount","outstanding_amount"],p),"collected_amount")],d.JSArray_Split),a,l)}),e(m,"depositTransactionSchema","$get$depositTransactionSchema",()=>{var a=null,i=t.Source_Source$mongodb("transactions","Deposits"),s=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId"),t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),"eventAt"),l=d.JSArray_String,p=t._setArrayType([t.Index$(t._setArrayType(["id"],l),a,a,a),t.Index$(t._setArrayType(["doc_id"],l),a,a,a),t.Index$(t._setArrayType(["deposit_id"],l),a,a,a),t.Index$(t._setArrayType(["business_id"],l),a,a,a),t.Index$(t._setArrayType(["restaurant_id","event_at"],l),"idx_deposit_transactions_select_index",a,a),t.Index$(t._setArrayType(["bill_id"],l),a,a,a)],d.JSArray_Index);return t.Schema_Schema$build(!1,"sales",u.List_empty,3,a,t._setArrayType(["restaurantId"],l),"One row per event in the life of a deposit: created, paid, applied, refunded or forfeited. Time control is event_at, when the event happened, while created_at stays the creation time of the deposit itself. net_cash_amount is the bank statement line (cash in less cash out), liability_change the deposit owed to customers, and income_amount the part kept as income. deposit carries one row per deposit with the same totals.",new t.depositTransactionSchema_closure,u.List_empty0,a,p,a,!0,!0,!1,!1,!1,!1,new t.depositTransactionSchema_closure0,"Deposit transaction","deposit_transactions","deposit_transaction",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_117,"createdAt",a,"mongodb_deposits","mongodb_company_db_deposits",a,!0,i,u.List_empty1,a,s)}),e(m,"discountSchema","$get$discountSchema",()=>{var a=null,i="createdAt",s=t.Source_Source$couchdb(a,""),l=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),i);return t.Schema_Schema$build(!1,"sales",u.List_empty,3,a,t._setArrayType(["restaurantId"],d.JSArray_String),"Combined discount view across adjustments and payments.",new t.discountSchema_closure,u.List_empty0,a,a,a,!0,!1,!1,!1,!1,!1,new t.discountSchema_closure0,"Discount (Adjustment, Payment)","adjustments","adjustment",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_20,i,`select
@@ -114,29 +114,32 @@ then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_a
114
114
  from (
115
115
  select
116
116
  *,
117
- to_char(
118
- (
119
- coalesce(effective_at, created_at)
120
- at time zone @TIMEZONE
121
- )::date,
122
- 'YYYYMMDD'
123
- )
124
- || '-'
125
- || lpad(
126
- row_number() over (
127
- partition by
128
- location_id,
129
- (
130
- coalesce(effective_at, created_at)
131
- at time zone @TIMEZONE
132
- )::date
133
- order by
134
- coalesce(effective_at, created_at),
135
- id
136
- )::text,
137
- 4,
138
- '0'
139
- ) as formatted_id
117
+ case when closing_id is not null then
118
+ to_char(
119
+ (
120
+ coalesce(effective_at, created_at)
121
+ at time zone @TIMEZONE
122
+ )::date,
123
+ 'YYYYMMDD'
124
+ )
125
+ || '-'
126
+ || lpad(
127
+ row_number() over (
128
+ partition by
129
+ location_id,
130
+ (
131
+ coalesce(effective_at, created_at)
132
+ at time zone @TIMEZONE
133
+ )::date,
134
+ closing_id is null
135
+ order by
136
+ coalesce(effective_at, created_at),
137
+ id
138
+ )::text,
139
+ 4,
140
+ '0'
141
+ )
142
+ end as formatted_id
140
143
  from closing_drafts
141
144
  ) t
142
145
  `,a,a,i,!0,l,u.List_empty1,i,p)}),e(m,"closingDraftSkuSchema","$get$closingDraftSkuSchema",()=>{var a="couchdb_closing_draft",i="createdAt",s=null,l=t.Source_Source$couchdb("skus","closingDraft"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId"),t.Permission_Permission$warehouse("warehouseId")],d.JSArray_Permission),i),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),s,s,s),t.Index$(t._setArrayType(["doc_id"],_),s,s,s),t.Index$(t._setArrayType(["published_at"],_),s,s,s),t.Index$(t._setArrayType(["location_id","created_at"],_),"idx_cds_select_index",s,s),t.Index$(t._setArrayType(["closing_adjustment_id","sku_id"],_),"idx_cds_closing_sku_index",s,s)],d.JSArray_Index);return t.Schema_Schema$build(!1,"inventory",u.List_empty,3,s,t._setArrayType(["restaurantId"],_),s,new t.closingDraftSkuSchema_closure,u.List_empty0,s,M,s,!0,!0,!1,!1,!0,!1,new t.closingDraftSkuSchema_closure0,"Closing draft sku","closing_draft_skus","closing_draft_sku",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_27,i,s,a,a,s,!0,l,u.List_empty1,s,p)}),e(m,"closingSkuSchema","$get$closingSkuSchema",()=>{var a="couchdb_closing",i="createdAt",s=null,l=t.Source_Source$couchdb("skus","closing"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId"),t.Permission_Permission$warehouse("warehouseId")],d.JSArray_Permission),i),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),s,s,s),t.Index$(t._setArrayType(["doc_id"],_),s,s,s),t.Index$(t._setArrayType(["created_at"],_),s,s,s),t.Index$(t._setArrayType(["location_id"],_),s,s,s),t.Index$(t._setArrayType(["published_at"],_),s,s,s)],d.JSArray_Index),b=t._setArrayType(["restaurantId"],_);return t.Schema_Schema$build(!1,"inventory",t._setArrayType(["closing","stock take","physical count","stocktake"],_),2,s,b,"Physical stock-take count per SKU per closing session.",new t.closingSkuSchema_closure,u.List_empty0,s,M,s,!0,!0,!1,!1,!1,!1,new t.closingSkuSchema_closure0,"Closing sku","closing_skus","closing_sku",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_25,i,s,a,a,s,!0,l,u.List_empty1,s,p)}),e(m,"collectibleCollectionSchema","$get$collectibleCollectionSchema",()=>{var a="mongodb_marketing_db_collections",i=null,s="createdAt",l=t.Source_Source$mongodb(i,"Collections"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId")],d.JSArray_Permission),s),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),i,i,i),t.Index$(t._setArrayType(["doc_id"],_),i,i,i),t.Index$(t._setArrayType(["created_at"],_),i,i,i),t.Index$(t._setArrayType(["business_id"],_),i,i,i),t.Index$(t._setArrayType(["user_id","type"],_),i,i,i)],d.JSArray_Index);return t.Schema_Schema$build(!1,"loyalty",u.List_empty,3,i,t._setArrayType([],_),"One row per holding of a collectible: VOUCHER and GAME get one row per issued item, carrying its code and max_use, while every other kind keeps one active row per member per collectible. type is the kind, labelled as in collectible_config. There is no balance column — the running balance of a stackable kind is to_balance on its latest collectible_transaction, and expiry, applied time and applied count are read back from those transactions too. created_at is when the holding was created; join member for the holder.",new t.collectibleCollectionSchema_closure,u.List_empty0,i,M,i,!0,!0,!1,!1,!1,!1,new t.collectibleCollectionSchema_closure0,"Collectible collection","collectible_collections","collectible_collection",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_70,s,i,a,a,i,!0,l,u.List_empty1,i,p)}),e(m,"collectibleConfigSchema","$get$collectibleConfigSchema",()=>{var a="mongodb_marketing_db_collectible_configs",i=null,s=t.Source_Source$mongodb(i,"CollectibleConfigs"),l=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId")],d.JSArray_Permission),i),p=d.JSArray_String,_=t._setArrayType([t.Index$(t._setArrayType(["id"],p),i,i,i),t.Index$(t._setArrayType(["doc_id"],p),i,i,i),t.Index$(t._setArrayType(["created_at"],p),i,i,i),t.Index$(t._setArrayType(["business_id"],p),i,i,i)],d.JSArray_Index);return t.Schema_Schema$build(!1,"loyalty",u.List_empty,3,i,t._setArrayType([],p),"One row per collectible a business issues, with its caps. type is the kind — VOUCHER, CREDIT, POINT, COIN, TIER, TITLE, GAME, STAMP or REFERRAL — and the portal labels three of them differently: COIN shows as Point, POINT as Experience, GAME as Token. VOUCHER is the v2 voucher; voucher_claim holds the v1 ones. A master for names and rules: the movements are in collectible_transaction and the holdings in collectible_collection, and it has no time control.",new t.collectibleConfigSchema_closure,u.List_empty0,i,_,i,!0,!0,!1,!1,!1,!1,new t.collectibleConfigSchema_closure0,"Collectible config","collectible_configs","collectible_config",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_65,i,i,a,a,i,!1,s,u.List_empty1,i,l)}),e(m,"collectibleTransactionSchema","$get$collectibleTransactionSchema",()=>{var a="mongodb_marketing_db_transactions",i="createdAt",s=null,l=t.Source_Source$mongodb("amounts","Transactions"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId")],d.JSArray_Permission),i),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),s,s,s),t.Index$(t._setArrayType(["doc_id"],_),s,s,s),t.Index$(t._setArrayType(["created_at"],_),s,s,s),t.Index$(t._setArrayType(["business_id"],_),s,s,s),t.Index$(t._setArrayType(["collection_id"],_),s,s,s),t.Index$(t._setArrayType(["business_id","created_at"],_),"idx_collectible_transactions_select_index",s,s),t.Index$(t._setArrayType(["ref_id"],_),s,s,s),t.Index$(t._setArrayType(["user_id"],_),s,s,s)],d.JSArray_Index);return t.Schema_Schema$build(!1,"loyalty",u.List_empty,3,s,t._setArrayType([],_),"One row per movement of a v2 collectible, granted, used, returned or expired, for every kind — vouchers, credit, stamps and the rest. The row carries no kind: filter on collectible_collection.type or collectible_config.type, where VOUCHER is the v2 voucher and voucher_claim holds the v1 ones. amount already carries its sign, so prefer qty_distributed, qty_usage and qty_expired; transformed_source renames only PORTAL, BENEFIT, CYCLE, BILL and ORDER and passes every other source, such as STORE, CASHBACK, STAMP_REWARD or REFERRAL, through as it is. created_at is when the movement happened, and it joins member, campaign, collectible_config, its collection, and the bill or store transaction in ref_id.",new t.collectibleTransactionSchema_closure,u.List_empty0,s,M,s,!0,!0,!1,!1,!1,!1,new t.collectibleTransactionSchema_closure0,"Collectible transaction","collectible_transactions","collectible_transaction",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_66,i,s,a,a,s,!0,l,u.List_empty1,s,p)}),e(m,"completeTimeBillSchema","$get$completeTimeBillSchema",()=>{var a=null,i=t.Source_Source$couchdb(a,""),s=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),"completedAt");return t.Schema_Schema$build(!1,"sales",u.List_empty,3,a,t._setArrayType(["restaurantId"],d.JSArray_String),"bill keyed by completion time instead of creation time — use only when the question is about when bills completed.",new t.completeTimeBillSchema_closure,u.List_empty0,a,a,a,!0,!1,!1,!1,!1,!1,new t.completeTimeBillSchema_closure0,"Bill (Complete time)","bills","bill",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_1,"createdAt",a,"","",a,!0,i,u.List_empty1,a,s)}),e(m,"counterSchema","$get$counterSchema",()=>{var a="couchdb_counter",i=null,s="createdAt",l=t.Source_Source$couchdb(i,"counter"),p=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),s),_=d.JSArray_String,M=t._setArrayType([t.Index$(t._setArrayType(["id"],_),i,i,i),t.Index$(t._setArrayType(["doc_id"],_),i,i,i),t.Index$(t._setArrayType(["restaurant_id"],_),i,i,i)],d.JSArray_Index),b=t._setArrayType(["restaurantId"],_);return t.Schema_Schema$build(!1,"operations",t._setArrayType(["counter","pos","terminal","register"],_),2,i,b,"POS counter/terminal master, one row per counter. Join it for counter names; not a fact table.",new t.counterSchema_closure,u.List_empty0,i,M,i,!0,!0,!1,!1,!1,!1,new t.counterSchema_closure0,"Counter","counters","counter",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_3,s,i,a,a,i,!0,l,u.List_empty1,i,p)}),e(m,"creditTransactionSchema","$get$creditTransactionSchema",()=>{var a=null,i="createdAt",s=t.Source_Source$mongodb(a,"CreditTransactions"),l=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId"),t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),i),p=d.JSArray_String,_=t._setArrayType([t.Index$(t._setArrayType(["id"],p),a,a,a),t.Index$(t._setArrayType(["doc_id"],p),a,a,a),t.Index$(t._setArrayType(["created_at"],p),a,a,a),t.Index$(t._setArrayType(["restaurant_id"],p),a,a,a),t.Index$(t._setArrayType(["business_id"],p),a,a,a)],d.JSArray_Index),M=t._setArrayType(["restaurantId"],p);return t.Schema_Schema$build(!1,"loyalty",t._setArrayType(["credit","point","reward point","loyalty point"],p),2,t.Canonical$(u.Map_empty,t._setArrayType(["total_amount","normal_amount","free_amount"],p),u.List_empty),M,"Loyalty credit ledger of the older CRM: one row per credit movement on a member. Earn and redeem are both rows here; member holds only the resulting balance. Amounts are in sen, hundredths of the currency unit.",new t.creditTransactionSchema_closure,u.List_empty0,a,_,a,!0,!0,!1,!1,!1,!1,new t.creditTransactionSchema_closure0,"Credit transaction","credit_transactions","credit_transaction",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_54,i,a,"mongodb_credit_transactions","mongodb_company_db_credit_transactions",a,!0,s,u.List_empty1,a,l)}),e(m,"dailyForecastSalesSchema","$get$dailyForecastSalesSchema",()=>{var a,i,s="benchmark_daily_sales_forecast",l="daily_forecast_sales",p="createdAt",_=null,M=d.JSArray_String,b=t._setArrayType(["restaurant_id","forecast_date","training_period","forecast_period","model_version"],M);return b=t.Source_Source$bigquery("feedme_dbt_mart_data",t._setArrayType(["forecast_date"],M),s,"published_at",b),a=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),p),i=t._setArrayType([t.Index$(t._setArrayType(["id"],M),_,_,_),t.Index$(t._setArrayType(["doc_id"],M),_,_,_),t.Index$(t._setArrayType(["restaurant_id","created_at"],M),_,_,_)],d.JSArray_Index),t.Schema_Schema$build(!1,"forecast",u.List_empty,3,_,t._setArrayType(["restaurantId"],M),"One row per outlet per forecast day per model run, where predicted is the forecast sales figure. created_at is the day being forecast, not when the model ran. Rows repeat across training_period, forecast_period and model_version, so pin one combination before summing. Join bill on outlet and day to compare the forecast against actual sales.",new t.dailyForecastSalesSchema_closure,u.List_empty0,_,i,43200,!0,!0,!1,!1,!1,!1,new t.dailyForecastSalesSchema_closure0,"Daily Forecast Sale",l,l,u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_84,p,_,s,s,_,!0,b,u.List_empty1,_,a)}),e(m,"depositSchema","$get$depositSchema",()=>{var a=null,i="createdAt",s=t.Source_Source$mongodb(a,"Deposits"),l=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId"),t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),i),p=d.JSArray_String,_=t._setArrayType([t.Index$(t._setArrayType(["id"],p),a,a,a),t.Index$(t._setArrayType(["doc_id"],p),a,a,a),t.Index$(t._setArrayType(["created_at"],p),a,a,a),t.Index$(t._setArrayType(["business_id"],p),a,a,a),t.Index$(t._setArrayType(["restaurant_id"],p),a,a,a),t.Index$(t._setArrayType(["restaurant_id","created_at"],p),"idx_deposits_select_index",a,a),t.Index$(t._setArrayType(["applied_bill_id"],p),a,a,a)],d.JSArray_Index);return t.Schema_Schema$build(!1,"sales",u.List_empty,3,a,t._setArrayType(["restaurantId"],p),"One row per customer deposit taken for a booking: what was collected, applied to a bill, refunded, forfeited or left outstanding. Answers deposit liability through outstanding_amount and deposit income through deposit_income_amount, the money kept that never reaches a bill. created_at is when the deposit was raised; deposit_transaction is the per-event timeline, and applied_bill_id joins the bill the deposit was spent on.",new t.depositSchema_closure,u.List_empty0,a,_,a,!0,!0,!1,!1,!1,!1,new t.depositSchema_closure0,"Deposit","deposits","deposit",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_116,i,a,"mongodb_deposits","mongodb_company_db_deposits",a,!0,s,t._setArrayType([t.Split$(t._setArrayType(["applied_amount","cash_out_amount","deposit_income_amount","outstanding_amount"],p),"collected_amount")],d.JSArray_Split),a,l)}),e(m,"depositTransactionSchema","$get$depositTransactionSchema",()=>{var a=null,i=t.Source_Source$mongodb("transactions","Deposits"),s=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$business("businessId"),t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),"eventAt"),l=d.JSArray_String,p=t._setArrayType([t.Index$(t._setArrayType(["id"],l),a,a,a),t.Index$(t._setArrayType(["doc_id"],l),a,a,a),t.Index$(t._setArrayType(["deposit_id"],l),a,a,a),t.Index$(t._setArrayType(["business_id"],l),a,a,a),t.Index$(t._setArrayType(["restaurant_id","event_at"],l),"idx_deposit_transactions_select_index",a,a),t.Index$(t._setArrayType(["bill_id"],l),a,a,a)],d.JSArray_Index);return t.Schema_Schema$build(!1,"sales",u.List_empty,3,a,t._setArrayType(["restaurantId"],l),"One row per event in the life of a deposit: created, paid, applied, refunded or forfeited. Time control is event_at, when the event happened, while created_at stays the creation time of the deposit itself. net_cash_amount is the bank statement line (cash in less cash out), liability_change the deposit owed to customers, and income_amount the part kept as income. deposit carries one row per deposit with the same totals.",new t.depositTransactionSchema_closure,u.List_empty0,a,p,a,!0,!0,!1,!1,!1,!1,new t.depositTransactionSchema_closure0,"Deposit transaction","deposit_transactions","deposit_transaction",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_117,"createdAt",a,"mongodb_deposits","mongodb_company_db_deposits",a,!0,i,u.List_empty1,a,s)}),e(m,"discountSchema","$get$discountSchema",()=>{var a=null,i="createdAt",s=t.Source_Source$couchdb(a,""),l=t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")],d.JSArray_Permission),i);return t.Schema_Schema$build(!1,"sales",u.List_empty,3,a,t._setArrayType(["restaurantId"],d.JSArray_String),"Combined discount view across adjustments and payments.",new t.discountSchema_closure,u.List_empty0,a,a,a,!0,!1,!1,!1,!1,!1,new t.discountSchema_closure0,"Discount (Adjustment, Payment)","adjustments","adjustment",u.MERGE_FILTER_TYPE_0,u.SCHEMA_NAME_20,i,`select
@@ -1,5 +1,5 @@
1
1
  import { unref as n } from "vue";
2
- import { e as u } from "./index-c2QQydke.js";
2
+ import { e as u } from "./index-B-TPuqE4.js";
3
3
  function e(r) {
4
4
  return u.currencyForCountry(n(r));
5
5
  }
@@ -1,4 +1,4 @@
1
- import { al as pr } from "./app-D9WJwZyu.js";
1
+ import { al as pr } from "./app-DovA8wu5.js";
2
2
  function zt(c) {
3
3
  throw new Error('Could not dynamically require "' + c + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -11559,29 +11559,32 @@ then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_a
11559
11559
  from (
11560
11560
  select
11561
11561
  *,
11562
- to_char(
11563
- (
11564
- coalesce(effective_at, created_at)
11565
- at time zone @TIMEZONE
11566
- )::date,
11567
- 'YYYYMMDD'
11568
- )
11569
- || '-'
11570
- || lpad(
11571
- row_number() over (
11572
- partition by
11573
- location_id,
11574
- (
11575
- coalesce(effective_at, created_at)
11576
- at time zone @TIMEZONE
11577
- )::date
11578
- order by
11579
- coalesce(effective_at, created_at),
11580
- id
11581
- )::text,
11582
- 4,
11583
- '0'
11584
- ) as formatted_id
11562
+ case when closing_id is not null then
11563
+ to_char(
11564
+ (
11565
+ coalesce(effective_at, created_at)
11566
+ at time zone @TIMEZONE
11567
+ )::date,
11568
+ 'YYYYMMDD'
11569
+ )
11570
+ || '-'
11571
+ || lpad(
11572
+ row_number() over (
11573
+ partition by
11574
+ location_id,
11575
+ (
11576
+ coalesce(effective_at, created_at)
11577
+ at time zone @TIMEZONE
11578
+ )::date,
11579
+ closing_id is null
11580
+ order by
11581
+ coalesce(effective_at, created_at),
11582
+ id
11583
+ )::text,
11584
+ 4,
11585
+ '0'
11586
+ )
11587
+ end as formatted_id
11585
11588
  from closing_drafts
11586
11589
  ) t
11587
11590
  `, a, a, i, !0, l, u.List_empty1, i, p);
@@ -1,4 +1,4 @@
1
- import { u as d, F as m, w as v, B as ye, a as Pe, b as we, E as Se, j as be } from "./app-D9WJwZyu.js";
1
+ import { u as d, F as m, w as v, B as ye, a as Pe, b as we, E as Se, j as be } from "./app-DovA8wu5.js";
2
2
  import { storeToRefs as l, defineStore as j } from "pinia";
3
3
  import { ref as i, computed as $, watch as Ae } from "vue";
4
4
  import { useSnackbar as W } from "@feedmepos/ui-library";
@@ -2,8 +2,8 @@ import { defineComponent as C, computed as S, resolveComponent as p, unref as c,
2
2
  import { storeToRefs as D } from "pinia";
3
3
  import { useI18n as V } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as x } from "@feedmepos/ui-library";
5
- import { f as J } from "./app-D9WJwZyu.js";
6
- import { _ as g } from "./_plugin-vue_export-helper-Bx7s49ra.js";
5
+ import { f as J } from "./app-DovA8wu5.js";
6
+ import { _ as g } from "./_plugin-vue_export-helper-N63MbPK5.js";
7
7
  const f = /^(\d{4}-\d{2}-\d{2})(?:[ T]00:00(?::00(?:\.0+)?)?)?$/, E = 1440 * 60 * 1e3, I = (t) => t.toLowerCase().startsWith("en");
8
8
  function d(t) {
9
9
  const a = f.exec(String(t));
@@ -1,11 +1,11 @@
1
1
  import { ref as O, shallowRef as Bt, getCurrentScope as Ct, onScopeDispose as Tt, watch as ie, onMounted as Pe, onBeforeUnmount as Le, defineComponent as $e, computed as $, resolveComponent as Oe, openBlock as c, createElementBlock as p, Fragment as fe, renderList as me, createElementVNode as N, createVNode as Z, toDisplayString as A, unref as v, createCommentVNode as j, createTextVNode as Ce, createBlock as ge, nextTick as we, normalizeClass as Ze, h as ce, useModel as rt, withCtx as Ue, mergeProps as ot, mergeModels as it } from "vue";
2
2
  import { storeToRefs as ze } from "pinia";
3
3
  import { detectLocale as qt } from "@feedmepos/mf-common";
4
- import { w as re, F as oe, u as De, a as Vt, a6 as Ft, a7 as Ut, a8 as Ht, a9 as Wt, A as Gt, aa as Yt, ab as Xt, ac as Kt, ad as Jt, ae as Qt, af as Zt } from "./app-D9WJwZyu.js";
5
- import { c as en } from "./currency-Dx3wVA1Q.js";
4
+ import { w as re, F as oe, u as De, a as Vt, a6 as Ft, a7 as Ut, a8 as Ht, a9 as Wt, A as Gt, aa as Yt, ab as Xt, ac as Kt, ad as Jt, ae as Qt, af as Zt } from "./app-DovA8wu5.js";
5
+ import { c as en } from "./currency-BuBigNK4.js";
6
6
  import { l as st } from "./report-canvas-libs-CNx4fuqd.js";
7
- import { u as Be, _ as Et } from "./_plugin-vue_export-helper-Bx7s49ra.js";
8
- import { v as lt } from "./report-tffVXl4d.js";
7
+ import { u as Be, _ as Et } from "./_plugin-vue_export-helper-N63MbPK5.js";
8
+ import { v as lt } from "./report-B7mn0l-p.js";
9
9
  function be(e) {
10
10
  const { businessId: t } = ze(De());
11
11
  if (!t.value) throw new Error("Business Id is not defined");
@@ -1,8 +1,8 @@
1
1
  import { computed as u } from "vue";
2
- import { u as c } from "./_plugin-vue_export-helper-Bx7s49ra.js";
2
+ import { u as c } from "./_plugin-vue_export-helper-N63MbPK5.js";
3
3
  import { useSnackbar as f } from "@feedmepos/ui-library";
4
4
  import { useCoreStore as d } from "@feedmepos/mf-common";
5
- import { a4 as l, a5 as i } from "./app-D9WJwZyu.js";
5
+ import { a4 as l, a5 as i } from "./app-DovA8wu5.js";
6
6
  function g(t) {
7
7
  return Array.isArray(t) ? t : [];
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-report",
3
- "version": "5.35.0",
3
+ "version": "5.35.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -34,7 +34,7 @@
34
34
  "pinia": "^2.3.1",
35
35
  "uuid": "^9.0.1",
36
36
  "vue": "^3.5.44",
37
- "vue-i18n": "^11.4.2",
37
+ "vue-i18n": "^11.4.16",
38
38
  "vue-router": "^4.2.5",
39
39
  "vuedraggable": "^4.1.0",
40
40
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"