@posx/core 5.5.390 → 5.5.392
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.
- package/CLAUDE.md +23 -23
- package/LICENSE +21 -21
- package/README.md +85 -85
- package/build/index.d.ts +79 -6
- package/build/index.js +3 -3
- package/dev/.stfolder/syncthing-folder-9a95b7.txt +5 -0
- package/dev/98894488.xlsx +0 -0
- package/dev/HappyThaiSembawang.csv +336 -0
- package/dev/KB/create-new-model.md +34 -0
- package/dev/KB/markdown-lint.md +14 -0
- package/dev/KB/readmefirst.md +6 -0
- package/dev/Merchants/HappyThaiSembawang.csv +400 -0
- package/dev/Merchants/HappyThaiSembawang.xlsx +0 -0
- package/dev/Product_Import_Template.xlsx +0 -0
- package/dev/XPOS Invoice Module.pdf +232 -0
- package/dev/harbor-harness-deployment.md +78 -0
- package/dev/nginx-harbor-harness.conf +84 -0
- package/dev/test-logs/2026-02.md +5 -0
- package/dev//344/272/247/345/223/201/345/257/274/345/205/245/346/250/241/346/235/277.xlsx +0 -0
- package/jest.config.cjs +36 -36
- package/jest.setup.cjs +80 -80
- package/package.json +1 -1
- package/package.publish.json +120 -120
- package/tsdown.config.ts +21 -21
- package/vite.config.ts +86 -86
- package/memo/technical-docs/01_ARCHITECTURE.md +0 -147
- package/memo/technical-docs/02_CORE_BUSINESS.md +0 -292
- package/memo/technical-docs/03_UI_COMPONENTS.md +0 -59
- package/memo/technical-docs/04_VIEWS.md +0 -82
- package/memo/technical-docs/05_DATA_LAYER.md +0 -375
- package/memo/technical-docs/06_CROSS_PLATFORM.md +0 -246
- package/memo/technical-docs/07_SIMILARITY_INDEX.md +0 -195
- package/memo/technical-docs/CHECKPOINT.md +0 -46
- package/memo/technical-docs/PROJECT_OVERVIEW.md +0 -122
- package/memo/technical-docs/TECHNICAL_DOCS_PLAN.md +0 -77
package/CLAUDE.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# Claude AI Development Guidelines
|
|
2
|
-
|
|
3
|
-
## Rules you have to follow strictly
|
|
4
|
-
|
|
5
|
-
- You are top-notch programmer who always write simplest code to achieve the ideal result
|
|
6
|
-
- you are one liner engineers and we believe "The Great Tao is Simple", so try to keep changes small and focused
|
|
7
|
-
- keep the changes as minimal as possible
|
|
8
|
-
- if or else has one line of code, then { } are not needed and it should be wrote into same line
|
|
9
|
-
- DO NOT write uncessary comment do not make newlines within a function and try to make the code compact
|
|
10
|
-
- All crucial code should have proper explanation in English
|
|
11
|
-
- Keep the simplifications as small and focused within the function or scope.
|
|
12
|
-
- Do not overhaul the whole file or codebase which is irrelevant to the current task.
|
|
13
|
-
|
|
14
|
-
## Best Practices for AI-Assisted Development
|
|
15
|
-
|
|
16
|
-
1. **在开始编码前先充分讨论和规划架构,确保理解用户的真实需求和使用场景,避免过度设计。**
|
|
17
|
-
|
|
18
|
-
2. **不要急于提交代码,应该等待用户明确指示后再进行 commit 和 push 操作。**
|
|
19
|
-
|
|
20
|
-
3. **优先选择简洁的实现方式(如函数导出而非类),并删除冗余的中间层方法以保持代码清晰。**
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
1
|
+
# Claude AI Development Guidelines
|
|
2
|
+
|
|
3
|
+
## Rules you have to follow strictly
|
|
4
|
+
|
|
5
|
+
- You are top-notch programmer who always write simplest code to achieve the ideal result
|
|
6
|
+
- you are one liner engineers and we believe "The Great Tao is Simple", so try to keep changes small and focused
|
|
7
|
+
- keep the changes as minimal as possible
|
|
8
|
+
- if or else has one line of code, then { } are not needed and it should be wrote into same line
|
|
9
|
+
- DO NOT write uncessary comment do not make newlines within a function and try to make the code compact
|
|
10
|
+
- All crucial code should have proper explanation in English
|
|
11
|
+
- Keep the simplifications as small and focused within the function or scope.
|
|
12
|
+
- Do not overhaul the whole file or codebase which is irrelevant to the current task.
|
|
13
|
+
|
|
14
|
+
## Best Practices for AI-Assisted Development
|
|
15
|
+
|
|
16
|
+
1. **在开始编码前先充分讨论和规划架构,确保理解用户的真实需求和使用场景,避免过度设计。**
|
|
17
|
+
|
|
18
|
+
2. **不要急于提交代码,应该等待用户明确指示后再进行 commit 和 push 操作。**
|
|
19
|
+
|
|
20
|
+
3. **优先选择简洁的实现方式(如函数导出而非类),并删除冗余的中间层方法以保持代码清晰。**
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
24
|
*This file contains guidelines learned from AI-human collaboration to improve development efficiency and code quality.*
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Francisco Hodge
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Francisco Hodge
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
# 第一阶段
|
|
2
|
-
- 1. 创建,更新,删除都是通过 -> Http API
|
|
3
|
-
- 2. 读取是通过本地数据库 -> 本地, (例外:订单从云端读取)
|
|
4
|
-
|
|
5
|
-
# 第二阶段 (单机版)
|
|
6
|
-
1. 创建,更新,删除,读取都通过本地数据库,然后进行数据和云端同步(Web Worker)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<div align="center">
|
|
19
|
-
<img align="center" width="230" src="https://i.imgur.com/iHgtvmg.png" />
|
|
20
|
-
<h2>Typescript Library Boilerplate Basic</h2>
|
|
21
|
-
<blockquote>Minimal Library Starter Kit for your Typescript projects</blockquote>
|
|
22
|
-
|
|
23
|
-
<a href="https://www.npmjs.com/package/@hodgef/ts-library-boilerplate-basic"><img src="https://badgen.net/npm/v/@hodgef/ts-library-boilerplate-basic?color=blue" alt="npm version"></a> <a href="https://github.com/hodgef/ts-library-boilerplate"><img src="https://img.shields.io/github/last-commit/hodgef/ts-library-boilerplate" alt="latest commit"></a> <a href="https://github.com/hodgef/ts-library-boilerplate-basic/actions"><img alt="Build Status" src="https://github.com/hodgef/ts-library-boilerplate-basic/workflows/Build/badge.svg?color=green" /></a> <a href="https://github.com/hodgef/ts-library-boilerplate-basic/actions"> <img alt="Publish Status" src="https://github.com/hodgef/ts-library-boilerplate-basic/workflows/Publish/badge.svg?color=green" /></a>
|
|
24
|
-
|
|
25
|
-
<strong>For a plain Javascript alternative, check out [js-library-boilerplate-basic](https://github.com/hodgef/js-library-boilerplate-basic).</strong>
|
|
26
|
-
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
## ⭐️ Features
|
|
30
|
-
|
|
31
|
-
- Webpack 5
|
|
32
|
-
- Babel 7
|
|
33
|
-
- Hot reloading (`npm start`)
|
|
34
|
-
- Automatic Types file generation (index.d.ts)
|
|
35
|
-
- UMD exports, so your library works everywhere.
|
|
36
|
-
- Jest unit testing
|
|
37
|
-
- Customizable file headers for your build [(Example 1)](https://github.com/hodgef/ts-library-boilerplate-basic/blob/master/build/index.js) [(Example2)](https://github.com/hodgef/ts-library-boilerplate-basic/blob/master/build/css/index.css)
|
|
38
|
-
- Daily [dependabot](https://dependabot.com) dependency updates
|
|
39
|
-
|
|
40
|
-
## 📦 Getting Started
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
git clone https://github.com/hodgef/ts-library-boilerplate-basic.git myLibrary
|
|
44
|
-
npm install
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## 💎 Customization
|
|
48
|
-
|
|
49
|
-
> Before shipping, make sure to:
|
|
50
|
-
|
|
51
|
-
1. Edit `LICENSE` file
|
|
52
|
-
2. Edit `package.json` information (These will be used to generate the headers for your built files)
|
|
53
|
-
3. Edit `library: "MyLibrary"` with your library's export name in `./webpack.config.js`
|
|
54
|
-
|
|
55
|
-
## 🚀 Deployment
|
|
56
|
-
|
|
57
|
-
1. `npm publish`
|
|
58
|
-
2. Your users can include your library as usual
|
|
59
|
-
|
|
60
|
-
### npm
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
import MyLibrary from 'my-library';
|
|
64
|
-
const libraryInstance = new MyLibrary();
|
|
65
|
-
...
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### self-host/cdn
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
<script src="build/index.js"></script>
|
|
72
|
-
|
|
73
|
-
const MyLibrary = window.MyLibrary.default;
|
|
74
|
-
const libraryInstance = new MyLibrary();
|
|
75
|
-
...
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## ✅ Libraries built with this boilerplate
|
|
79
|
-
|
|
80
|
-
> Made a library using this starter kit? Share it here by [submitting a pull request](https://github.com/hodgef/ts-library-boilerplate-basic/pulls)!
|
|
81
|
-
|
|
82
|
-
- [simple-keyboard](https://github.com/hodgef/simple-keyboard) - Javascript Virtual Keyboard
|
|
83
|
-
- [react-simple-keyboard](https://github.com/hodgef/react-simple-keyboard) - React Virtual Keyboard
|
|
84
|
-
- [simple-keyboard-layouts](https://github.com/hodgef/simple-keyboard-layouts) - Keyboard layouts for simple-keyboard
|
|
85
|
-
- [atlas-monaco](https://github.com/datdao/atlas-monaco) - AtlasHCL for monaco editor
|
|
1
|
+
# 第一阶段
|
|
2
|
+
- 1. 创建,更新,删除都是通过 -> Http API
|
|
3
|
+
- 2. 读取是通过本地数据库 -> 本地, (例外:订单从云端读取)
|
|
4
|
+
|
|
5
|
+
# 第二阶段 (单机版)
|
|
6
|
+
1. 创建,更新,删除,读取都通过本地数据库,然后进行数据和云端同步(Web Worker)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<div align="center">
|
|
19
|
+
<img align="center" width="230" src="https://i.imgur.com/iHgtvmg.png" />
|
|
20
|
+
<h2>Typescript Library Boilerplate Basic</h2>
|
|
21
|
+
<blockquote>Minimal Library Starter Kit for your Typescript projects</blockquote>
|
|
22
|
+
|
|
23
|
+
<a href="https://www.npmjs.com/package/@hodgef/ts-library-boilerplate-basic"><img src="https://badgen.net/npm/v/@hodgef/ts-library-boilerplate-basic?color=blue" alt="npm version"></a> <a href="https://github.com/hodgef/ts-library-boilerplate"><img src="https://img.shields.io/github/last-commit/hodgef/ts-library-boilerplate" alt="latest commit"></a> <a href="https://github.com/hodgef/ts-library-boilerplate-basic/actions"><img alt="Build Status" src="https://github.com/hodgef/ts-library-boilerplate-basic/workflows/Build/badge.svg?color=green" /></a> <a href="https://github.com/hodgef/ts-library-boilerplate-basic/actions"> <img alt="Publish Status" src="https://github.com/hodgef/ts-library-boilerplate-basic/workflows/Publish/badge.svg?color=green" /></a>
|
|
24
|
+
|
|
25
|
+
<strong>For a plain Javascript alternative, check out [js-library-boilerplate-basic](https://github.com/hodgef/js-library-boilerplate-basic).</strong>
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
## ⭐️ Features
|
|
30
|
+
|
|
31
|
+
- Webpack 5
|
|
32
|
+
- Babel 7
|
|
33
|
+
- Hot reloading (`npm start`)
|
|
34
|
+
- Automatic Types file generation (index.d.ts)
|
|
35
|
+
- UMD exports, so your library works everywhere.
|
|
36
|
+
- Jest unit testing
|
|
37
|
+
- Customizable file headers for your build [(Example 1)](https://github.com/hodgef/ts-library-boilerplate-basic/blob/master/build/index.js) [(Example2)](https://github.com/hodgef/ts-library-boilerplate-basic/blob/master/build/css/index.css)
|
|
38
|
+
- Daily [dependabot](https://dependabot.com) dependency updates
|
|
39
|
+
|
|
40
|
+
## 📦 Getting Started
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
git clone https://github.com/hodgef/ts-library-boilerplate-basic.git myLibrary
|
|
44
|
+
npm install
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 💎 Customization
|
|
48
|
+
|
|
49
|
+
> Before shipping, make sure to:
|
|
50
|
+
|
|
51
|
+
1. Edit `LICENSE` file
|
|
52
|
+
2. Edit `package.json` information (These will be used to generate the headers for your built files)
|
|
53
|
+
3. Edit `library: "MyLibrary"` with your library's export name in `./webpack.config.js`
|
|
54
|
+
|
|
55
|
+
## 🚀 Deployment
|
|
56
|
+
|
|
57
|
+
1. `npm publish`
|
|
58
|
+
2. Your users can include your library as usual
|
|
59
|
+
|
|
60
|
+
### npm
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
import MyLibrary from 'my-library';
|
|
64
|
+
const libraryInstance = new MyLibrary();
|
|
65
|
+
...
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### self-host/cdn
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
<script src="build/index.js"></script>
|
|
72
|
+
|
|
73
|
+
const MyLibrary = window.MyLibrary.default;
|
|
74
|
+
const libraryInstance = new MyLibrary();
|
|
75
|
+
...
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## ✅ Libraries built with this boilerplate
|
|
79
|
+
|
|
80
|
+
> Made a library using this starter kit? Share it here by [submitting a pull request](https://github.com/hodgef/ts-library-boilerplate-basic/pulls)!
|
|
81
|
+
|
|
82
|
+
- [simple-keyboard](https://github.com/hodgef/simple-keyboard) - Javascript Virtual Keyboard
|
|
83
|
+
- [react-simple-keyboard](https://github.com/hodgef/react-simple-keyboard) - React Virtual Keyboard
|
|
84
|
+
- [simple-keyboard-layouts](https://github.com/hodgef/simple-keyboard-layouts) - Keyboard layouts for simple-keyboard
|
|
85
|
+
- [atlas-monaco](https://github.com/datdao/atlas-monaco) - AtlasHCL for monaco editor
|
package/build/index.d.ts
CHANGED
|
@@ -1308,6 +1308,7 @@ declare enum ModelPrefix {
|
|
|
1308
1308
|
ComboGroup = "cbo_",
|
|
1309
1309
|
Storage = "sto_",
|
|
1310
1310
|
Menu = "men_",
|
|
1311
|
+
StockLog = "stl_",
|
|
1311
1312
|
}
|
|
1312
1313
|
declare enum ModelType {
|
|
1313
1314
|
Merchant = "mnt",
|
|
@@ -3214,12 +3215,16 @@ interface ICustomerDisplaySystemConfig {
|
|
|
3214
3215
|
full_screen_assets: string[];
|
|
3215
3216
|
half_screen_assets: string[];
|
|
3216
3217
|
is_logo_hidden: boolean;
|
|
3218
|
+
order_list_font_size?: string;
|
|
3219
|
+
order_modifier_font_size?: string;
|
|
3217
3220
|
}
|
|
3218
3221
|
declare class CustomerDisplaySystemConfig implements ICustomerDisplaySystemConfig {
|
|
3219
3222
|
enabled: boolean;
|
|
3220
3223
|
full_screen_assets: any[];
|
|
3221
3224
|
half_screen_assets: any[];
|
|
3222
3225
|
is_logo_hidden: boolean;
|
|
3226
|
+
order_list_font_size: string;
|
|
3227
|
+
order_modifier_font_size: string;
|
|
3223
3228
|
constructor();
|
|
3224
3229
|
}
|
|
3225
3230
|
interface IKioskSystemConfig {
|
|
@@ -3677,12 +3682,14 @@ declare class TaxConfig implements ITaxConfig {
|
|
|
3677
3682
|
interface IRoundingConfig {
|
|
3678
3683
|
/** Base for rounding */
|
|
3679
3684
|
base: number;
|
|
3680
|
-
/** Rounding up flag */
|
|
3685
|
+
/** Rounding up flag (always up when nearest=false) */
|
|
3681
3686
|
up: boolean;
|
|
3682
3687
|
/** Cashless rounding flag */
|
|
3683
3688
|
cashless: boolean;
|
|
3684
3689
|
/** Prepayment rounding flag */
|
|
3685
3690
|
prepayment_rounding?: boolean;
|
|
3691
|
+
/** Round to nearest (half up) instead of always up/down */
|
|
3692
|
+
nearest?: boolean;
|
|
3686
3693
|
}
|
|
3687
3694
|
interface IChargeConfig {
|
|
3688
3695
|
service_charge: boolean;
|
|
@@ -3913,6 +3920,7 @@ type ISalesSummary = {
|
|
|
3913
3920
|
void_invoice_count: number;
|
|
3914
3921
|
void_invoice_total: number;
|
|
3915
3922
|
total_pax: number;
|
|
3923
|
+
pax_sales_total: number;
|
|
3916
3924
|
};
|
|
3917
3925
|
declare class SalesSummary implements ISalesSummary {
|
|
3918
3926
|
sales_total: number;
|
|
@@ -3931,6 +3939,7 @@ declare class SalesSummary implements ISalesSummary {
|
|
|
3931
3939
|
void_invoice_count: number;
|
|
3932
3940
|
void_invoice_total: number;
|
|
3933
3941
|
total_pax: number;
|
|
3942
|
+
pax_sales_total: number;
|
|
3934
3943
|
}
|
|
3935
3944
|
type IDrawerSummary = {
|
|
3936
3945
|
open_amount: number;
|
|
@@ -4372,6 +4381,60 @@ declare class Menu extends AppBaseModel implements IMenu {
|
|
|
4372
4381
|
online_order_session_expiry_in_minutes: number;
|
|
4373
4382
|
}
|
|
4374
4383
|
//#endregion
|
|
4384
|
+
//#region src/types/stock.type.d.ts
|
|
4385
|
+
declare enum StockLogType {
|
|
4386
|
+
In = "IN",
|
|
4387
|
+
Out = "OUT",
|
|
4388
|
+
Adjust = "ADJUST",
|
|
4389
|
+
Production = "PRODUCTION",
|
|
4390
|
+
}
|
|
4391
|
+
declare enum StockLogRefType {
|
|
4392
|
+
Invoice = "invoice",
|
|
4393
|
+
Purchase = "purchase",
|
|
4394
|
+
Production = "production",
|
|
4395
|
+
Stocktake = "stocktake",
|
|
4396
|
+
}
|
|
4397
|
+
declare enum StockLogEntityType {
|
|
4398
|
+
Item = "item",
|
|
4399
|
+
Material = "material",
|
|
4400
|
+
}
|
|
4401
|
+
interface IStockLog extends IAppCoreModel {
|
|
4402
|
+
/** entity type: item or material */
|
|
4403
|
+
entity_type: StockLogEntityType;
|
|
4404
|
+
/** entity uid (item_uid or material_uid) */
|
|
4405
|
+
entity_uid: string;
|
|
4406
|
+
/** operation type */
|
|
4407
|
+
type: StockLogType;
|
|
4408
|
+
/** quantity changed */
|
|
4409
|
+
qty: number;
|
|
4410
|
+
/** quantity before change */
|
|
4411
|
+
qty_before: number;
|
|
4412
|
+
/** quantity after change */
|
|
4413
|
+
qty_after: number;
|
|
4414
|
+
/** reference document type */
|
|
4415
|
+
ref_type?: StockLogRefType;
|
|
4416
|
+
/** reference document uid */
|
|
4417
|
+
ref_uid?: string;
|
|
4418
|
+
/** reason or note */
|
|
4419
|
+
reason?: string;
|
|
4420
|
+
/** created by user uid */
|
|
4421
|
+
created_by?: string;
|
|
4422
|
+
}
|
|
4423
|
+
declare class StockLog extends AppCoreModel implements IStockLog {
|
|
4424
|
+
entity_type: StockLogEntityType;
|
|
4425
|
+
entity_uid: string;
|
|
4426
|
+
type: StockLogType;
|
|
4427
|
+
qty: number;
|
|
4428
|
+
qty_before: number;
|
|
4429
|
+
qty_after: number;
|
|
4430
|
+
ref_type?: StockLogRefType;
|
|
4431
|
+
ref_uid?: string;
|
|
4432
|
+
reason?: string;
|
|
4433
|
+
created_by?: string;
|
|
4434
|
+
uid: string;
|
|
4435
|
+
constructor();
|
|
4436
|
+
}
|
|
4437
|
+
//#endregion
|
|
4375
4438
|
//#region src/services/app.service.d.ts
|
|
4376
4439
|
type IEmployeeRoleService = IAppRemoteService<IEmployeeRole> & IAppRemoteService<IEmployeeRole>;
|
|
4377
4440
|
type INoteService = IAppRemoteService<INote>;
|
|
@@ -4955,6 +5018,15 @@ declare class StorageService<T = Record<string, unknown>> extends AppRemoteServi
|
|
|
4955
5018
|
readonly methodName: string;
|
|
4956
5019
|
constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
|
|
4957
5020
|
}
|
|
5021
|
+
type IStockLogService = IAppRemoteService<IStockLog>;
|
|
5022
|
+
declare class StockLogService extends AppRemoteService<IStockLog> implements IStockLogService {
|
|
5023
|
+
readonly http: AxiosInstance;
|
|
5024
|
+
readonly db: Dexie;
|
|
5025
|
+
readonly options: IServiceOptions;
|
|
5026
|
+
readonly moduleName: string;
|
|
5027
|
+
readonly methodName: string;
|
|
5028
|
+
constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
|
|
5029
|
+
}
|
|
4958
5030
|
//#endregion
|
|
4959
5031
|
//#region src/service.factory.d.ts
|
|
4960
5032
|
declare const dbSchemas: {
|
|
@@ -4976,6 +5048,7 @@ declare const dbSchemas: {
|
|
|
4976
5048
|
order_displays: string;
|
|
4977
5049
|
storages: string;
|
|
4978
5050
|
menus: string;
|
|
5051
|
+
stock_logs: string;
|
|
4979
5052
|
};
|
|
4980
5053
|
declare class ServiceFactory {
|
|
4981
5054
|
readonly options: IServiceOptions;
|
|
@@ -5133,8 +5206,8 @@ interface IInvoiceBaseService extends IAppRemoteService<IInvoice> {
|
|
|
5133
5206
|
calculateDeliveryCharge(invoice: IInvoice): void;
|
|
5134
5207
|
calculateInvoiceServiceChargeableSubtotal(invoice: IInvoice): void;
|
|
5135
5208
|
calculateDiscount(invoice: IInvoice, flow: CalcFlow): void;
|
|
5136
|
-
calculateRounding(invoice: IInvoice, roundingBase: number, roundingUp: boolean, roundingCashless: boolean): void;
|
|
5137
|
-
roundingStep(total: number, roundingBase: number, roundingUp: boolean): number;
|
|
5209
|
+
calculateRounding(invoice: IInvoice, roundingBase: number, roundingUp: boolean, roundingCashless: boolean, roundingNearest?: boolean): void;
|
|
5210
|
+
roundingStep(total: number, roundingBase: number, roundingUp: boolean, roundingNearest?: boolean): number;
|
|
5138
5211
|
calculateServiceCharge(invoice: IInvoice, rate: number): void;
|
|
5139
5212
|
calculateTax(invoice: IInvoice, taxRate: number, taxMethod: TaxMethod): void;
|
|
5140
5213
|
calculateCreditDeduction(invoice: IInvoice): void;
|
|
@@ -5196,8 +5269,8 @@ declare class InvoiceBaseService extends AppRemoteService<IInvoice> implements I
|
|
|
5196
5269
|
* @param roundingUp - Whether to round up or down.
|
|
5197
5270
|
* @param roundingCashless - Whether to apply rounding only for cash payments.
|
|
5198
5271
|
*/
|
|
5199
|
-
calculateRounding(invoice: IInvoice, roundingBase: number, roundingUp: boolean, roundingCashless: boolean): void;
|
|
5200
|
-
roundingStep(total: number, roundingBase: number, roundingUp: boolean): number;
|
|
5272
|
+
calculateRounding(invoice: IInvoice, roundingBase: number, roundingUp: boolean, roundingCashless: boolean, roundingNearest?: boolean): void;
|
|
5273
|
+
roundingStep(total: number, roundingBase: number, roundingUp: boolean, roundingNearest?: boolean): number;
|
|
5201
5274
|
/**
|
|
5202
5275
|
* Calculate the delivery charge of an invoice
|
|
5203
5276
|
* @param invoice - The invoice object containing delivery charge and type
|
|
@@ -5898,5 +5971,5 @@ interface ValidationResult {
|
|
|
5898
5971
|
}
|
|
5899
5972
|
declare function validateSTTemplate(jsonStr: string): ValidationResult;
|
|
5900
5973
|
//#endregion
|
|
5901
|
-
export { Address, AppBaseModel, AppConfig, AppCoreModel, AppCoreService, AppExtraModel, AppLocalService, AppMiscService, AppRemoteService, AppReport, AppReportService, Applying, AssetTags, AssetType, Between, BreakPeriod, Cache, CalcFlow, CalcType, CancelInvoiceOptions, CardPaymentCode, CashDrawerConfig, Category, CategorySalesSummary, CategoryService, CategoryType, Charge, ChargeConfig, CheckInvoiceOptions, Codepages, ComboGroup, ComboGroupItem, Condition, Config, ConfigService, CoreCategory, CoreItem, Coupon, CouponItemized, CouponUsage, CreateInvoiceOptions, CrmConfig, CurrencyConfig, CustomResponse, Customer, CustomerDisplaySystemConfig, DayOfWeek, DeployChannel, Device, DeviceEtc, DeviceType, DirectPayInvoiceOptions, DiscountType, DrawerSummary, ElectronSocket, Employee, EmployeeRole, EmployeeRoleService, EmployeeService, ErrorMsgs, EscPosCompatibility, EscPosPrinter, FileUploadRequest, GTOConfig, GeneralConfig, GetManyResult, Holiday, IAddress, IAppBase, IAppBaseModel, IAppConfig, IAppCore, IAppCoreModel, IAppCoreService, IAppExtra, IAppExtraModel, IAppLocalService, IAppMiscService, IAppModelSequence, IAppRemoteService, IAppReport, IAppReportService, IApplying, ICache, ICashDrawerConfig, ICategory, ICategoryService, IChangePaymentMethodOption, ICharge, IChargeConfig, IComboGroup, IComboGroupItem, IConfig, IConfigService, ICoreCategory, ICoreItem, ICoupon, ICouponItemized, ICouponUsage, ICredit, ICrmConfig, ICurrencyConfig, ICustomer, ICustomerDisplaySystemConfig, IDevice, IDiscount, IDrawerSummary, IEmployee, IEmployeeRole, IEmployeeRoleService, IEmployeeService, IEscPosPrinter, IEtc, IExportRow, IFileUploadRequest, IFileUploadResponse, IFontSize, IGeneralConfig, IGtoConfig, IInventoryConfig, IInvoice, IInvoiceActivity, IInvoiceBaseService, IInvoiceCharge, IInvoiceCoreLine, IInvoiceDiscount, IInvoiceLine, IInvoiceOperationService, IInvoiceService, IItem, IItemService, IKdsConfig, IKioskSystemConfig, IKitchenConfig, ILabelConfig, ILineOperationService, ILoyaltyProgram, ILoyaltyProgramSummary, IMarketing, IMenu, IMenuService, IMerchant, IMerchantAsset, INode, INodePrinter, INote, INoteEntity, INoteGroup, INoteGroupEntity, INoteGroupService, INoteService, IOnlineOrderConfig, IOrderConfig, IOrderDisplay, IOrderDisplayService, IOrderDisplaySystemConfig, IPaxConfig, IPayment, IPaymentConfig, IPaymentMethod, IPaymentMethodHistory, IPaymentMethodService, IPaymentService, IPaymentSummary, IPoint, IPrice, IPrintBarcode, IPrintCommand, IPrintCommandLine, IPrintImage, IPrintJob, IPrintJobService, IPrintQrcode, IPrintTable, IPrintTableRowItem, IPrintTemplate, IPrintTemplateCore, IPrintTemplateService, IPrintText, IPrinter, IPrinterService, IProductBase, IProductService, IPushData, IReceiptConfig, IRenderPrintTemplateOptions, IReport, IReportCategory, IReportConfig, IReportData, IReportRequest, IRoundingConfig, ISalesSummary, ISection, ISectionItem, ISectionItemService, ISectionService, IServiceOptions, IShift, IShiftService, IStandardPaymentMethod, IStorage, ISubcategory, ISubcategoryService, ITaxConfig, ITemplateData, ITill, ITillConfig, ITillService, IUser, IUserConfig, IVisibility, In, Include, InventoryConfig, Invoice, InvoiceAction, InvoiceActivity, InvoiceBaseService, InvoiceCharge, InvoiceCoreLine, InvoiceDiscount, InvoiceLine, InvoiceOperationService, InvoiceService, InvoiceStatus, InvoiceType, Item, ItemSalesSummary, ItemService, KdsConfig, KioskSystemConfig, KitchenConfig, LabelConfig, LineOperationService, LineOptions, LoyaltyProgram, LoyaltyProgramSummary, MarketingConfig, Menu, MenuService, Merchant, MessageType, ModelPrefix, ModelType, ModifierSalesSummary, Node, NodePrinter, Not, Note, NoteEntity, NoteGroup, NoteGroupEntity, OnlineOrderConfig, OpenHours, OrderConfig, OrderDisplay, OrderDisplayService, OrderDisplayStatus, OrderDisplaySystemConfig, OrderFlow, PaxConfig, PayInvoiceOptions, Payment, PaymentConfig, PaymentMethod, PaymentMethodHistory, PaymentMethodService, PaymentService, PaymentStatus, PaymentSummary, PaynowMethod, Price, PrintAlign, PrintBarcode, PrintCommand, PrintImage, PrintJob, PrintJobService, PrintJobStatus, PrintQrcode, PrintSize, PrintStyle, PrintTemplate, PrintTemplateCore, PrintTemplateService, PrintType, Printer, PrinterConnections, PrinterProtocols, PrinterService, PrinterStatus, PrinterType, ProductBase, ProductPartialAssets, ProductPartialConfig, ProductService, ProductType, PushData, Raw, Receipt, RenderPrintTemplateOptions, Report, ReportCategory, ReportConfig, ReportData, ReportType, RoundingConfig, SalesSummary, Schedule, Section, SectionItem, SectionItemService, SectionItemStatus, SectionService, ServiceFactory, ServiceMode, ServiceOptions, Shift, ShiftService, ShiftStatus, SpecialDay, StandardPaymentMethod, StockChange, Storage, StorageService, Subcategory, SwitchInvoiceOptions, System, SystemError, TCategorySalesSummary, TDynamicOrderQR, TItemCoreSalesSummary, TItemSalesSummary, TModifierSalesSummary, TStockChange, TStockChangeItem, TStorageService, TaxConfig, TaxMethod, TemplateData, Till, TillConfig, TillService, TillType, UomType, UpdateGeneralConfigOptions, UpdateInvoiceOptions, User, UserConfig, type ValidationError, type ValidationResult, Visibility, VoidInvoiceOptions, createCSVExport, dbSchemas, filterByParams, humanizedData, importFromCSV, normalizedDate, transformer, validateSTTemplate };
|
|
5974
|
+
export { Address, AppBaseModel, AppConfig, AppCoreModel, AppCoreService, AppExtraModel, AppLocalService, AppMiscService, AppRemoteService, AppReport, AppReportService, Applying, AssetTags, AssetType, Between, BreakPeriod, Cache, CalcFlow, CalcType, CancelInvoiceOptions, CardPaymentCode, CashDrawerConfig, Category, CategorySalesSummary, CategoryService, CategoryType, Charge, ChargeConfig, CheckInvoiceOptions, Codepages, ComboGroup, ComboGroupItem, Condition, Config, ConfigService, CoreCategory, CoreItem, Coupon, CouponItemized, CouponUsage, CreateInvoiceOptions, CrmConfig, CurrencyConfig, CustomResponse, Customer, CustomerDisplaySystemConfig, DayOfWeek, DeployChannel, Device, DeviceEtc, DeviceType, DirectPayInvoiceOptions, DiscountType, DrawerSummary, ElectronSocket, Employee, EmployeeRole, EmployeeRoleService, EmployeeService, ErrorMsgs, EscPosCompatibility, EscPosPrinter, FileUploadRequest, GTOConfig, GeneralConfig, GetManyResult, Holiday, IAddress, IAppBase, IAppBaseModel, IAppConfig, IAppCore, IAppCoreModel, IAppCoreService, IAppExtra, IAppExtraModel, IAppLocalService, IAppMiscService, IAppModelSequence, IAppRemoteService, IAppReport, IAppReportService, IApplying, ICache, ICashDrawerConfig, ICategory, ICategoryService, IChangePaymentMethodOption, ICharge, IChargeConfig, IComboGroup, IComboGroupItem, IConfig, IConfigService, ICoreCategory, ICoreItem, ICoupon, ICouponItemized, ICouponUsage, ICredit, ICrmConfig, ICurrencyConfig, ICustomer, ICustomerDisplaySystemConfig, IDevice, IDiscount, IDrawerSummary, IEmployee, IEmployeeRole, IEmployeeRoleService, IEmployeeService, IEscPosPrinter, IEtc, IExportRow, IFileUploadRequest, IFileUploadResponse, IFontSize, IGeneralConfig, IGtoConfig, IInventoryConfig, IInvoice, IInvoiceActivity, IInvoiceBaseService, IInvoiceCharge, IInvoiceCoreLine, IInvoiceDiscount, IInvoiceLine, IInvoiceOperationService, IInvoiceService, IItem, IItemService, IKdsConfig, IKioskSystemConfig, IKitchenConfig, ILabelConfig, ILineOperationService, ILoyaltyProgram, ILoyaltyProgramSummary, IMarketing, IMenu, IMenuService, IMerchant, IMerchantAsset, INode, INodePrinter, INote, INoteEntity, INoteGroup, INoteGroupEntity, INoteGroupService, INoteService, IOnlineOrderConfig, IOrderConfig, IOrderDisplay, IOrderDisplayService, IOrderDisplaySystemConfig, IPaxConfig, IPayment, IPaymentConfig, IPaymentMethod, IPaymentMethodHistory, IPaymentMethodService, IPaymentService, IPaymentSummary, IPoint, IPrice, IPrintBarcode, IPrintCommand, IPrintCommandLine, IPrintImage, IPrintJob, IPrintJobService, IPrintQrcode, IPrintTable, IPrintTableRowItem, IPrintTemplate, IPrintTemplateCore, IPrintTemplateService, IPrintText, IPrinter, IPrinterService, IProductBase, IProductService, IPushData, IReceiptConfig, IRenderPrintTemplateOptions, IReport, IReportCategory, IReportConfig, IReportData, IReportRequest, IRoundingConfig, ISalesSummary, ISection, ISectionItem, ISectionItemService, ISectionService, IServiceOptions, IShift, IShiftService, IStandardPaymentMethod, IStockLog, IStockLogService, IStorage, ISubcategory, ISubcategoryService, ITaxConfig, ITemplateData, ITill, ITillConfig, ITillService, IUser, IUserConfig, IVisibility, In, Include, InventoryConfig, Invoice, InvoiceAction, InvoiceActivity, InvoiceBaseService, InvoiceCharge, InvoiceCoreLine, InvoiceDiscount, InvoiceLine, InvoiceOperationService, InvoiceService, InvoiceStatus, InvoiceType, Item, ItemSalesSummary, ItemService, KdsConfig, KioskSystemConfig, KitchenConfig, LabelConfig, LineOperationService, LineOptions, LoyaltyProgram, LoyaltyProgramSummary, MarketingConfig, Menu, MenuService, Merchant, MessageType, ModelPrefix, ModelType, ModifierSalesSummary, Node, NodePrinter, Not, Note, NoteEntity, NoteGroup, NoteGroupEntity, OnlineOrderConfig, OpenHours, OrderConfig, OrderDisplay, OrderDisplayService, OrderDisplayStatus, OrderDisplaySystemConfig, OrderFlow, PaxConfig, PayInvoiceOptions, Payment, PaymentConfig, PaymentMethod, PaymentMethodHistory, PaymentMethodService, PaymentService, PaymentStatus, PaymentSummary, PaynowMethod, Price, PrintAlign, PrintBarcode, PrintCommand, PrintImage, PrintJob, PrintJobService, PrintJobStatus, PrintQrcode, PrintSize, PrintStyle, PrintTemplate, PrintTemplateCore, PrintTemplateService, PrintType, Printer, PrinterConnections, PrinterProtocols, PrinterService, PrinterStatus, PrinterType, ProductBase, ProductPartialAssets, ProductPartialConfig, ProductService, ProductType, PushData, Raw, Receipt, RenderPrintTemplateOptions, Report, ReportCategory, ReportConfig, ReportData, ReportType, RoundingConfig, SalesSummary, Schedule, Section, SectionItem, SectionItemService, SectionItemStatus, SectionService, ServiceFactory, ServiceMode, ServiceOptions, Shift, ShiftService, ShiftStatus, SpecialDay, StandardPaymentMethod, StockChange, StockLog, StockLogEntityType, StockLogRefType, StockLogService, StockLogType, Storage, StorageService, Subcategory, SwitchInvoiceOptions, System, SystemError, TCategorySalesSummary, TDynamicOrderQR, TItemCoreSalesSummary, TItemSalesSummary, TModifierSalesSummary, TStockChange, TStockChangeItem, TStorageService, TaxConfig, TaxMethod, TemplateData, Till, TillConfig, TillService, TillType, UomType, UpdateGeneralConfigOptions, UpdateInvoiceOptions, User, UserConfig, type ValidationError, type ValidationResult, Visibility, VoidInvoiceOptions, createCSVExport, dbSchemas, filterByParams, humanizedData, importFromCSV, normalizedDate, transformer, validateSTTemplate };
|
|
5902
5975
|
//# sourceMappingURL=index.d.ts.map
|