@posx/core 5.5.512 → 5.5.515
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/AGENTS.md +24 -0
- package/CLAUDE.md +24 -0
- package/LICENSE +21 -21
- package/README.md +85 -85
- package/build/index.d.ts +19 -4
- package/build/index.js +1 -1
- package/jest.config.cjs +36 -0
- package/jest.setup.cjs +80 -0
- package/memo/technical-docs/01_ARCHITECTURE.md +147 -0
- package/memo/technical-docs/02_CORE_BUSINESS.md +292 -0
- package/memo/technical-docs/03_UI_COMPONENTS.md +59 -0
- package/memo/technical-docs/04_VIEWS.md +82 -0
- package/memo/technical-docs/05_DATA_LAYER.md +375 -0
- package/memo/technical-docs/06_CROSS_PLATFORM.md +246 -0
- package/memo/technical-docs/07_SIMILARITY_INDEX.md +195 -0
- package/memo/technical-docs/CHECKPOINT.md +46 -0
- package/memo/technical-docs/PROJECT_OVERVIEW.md +122 -0
- package/memo/technical-docs/TECHNICAL_DOCS_PLAN.md +77 -0
- package/package.json +2 -86
- package/package.publish.json +121 -0
- package/tsdown.config.ts +21 -0
- package/vite.config.ts +86 -0
- package/build/index.js.map +0 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Codex 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
|
+
*This file contains guidelines learned from AI-human collaboration to improve development efficiency and code quality.*
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +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
|
+
|
|
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
|
@@ -444,7 +444,7 @@ declare class Till extends AppCoreModel implements ITill {
|
|
|
444
444
|
constructor();
|
|
445
445
|
}
|
|
446
446
|
//#endregion
|
|
447
|
-
//#region node_modules/dexie/dist/dexie.d.ts
|
|
447
|
+
//#region node_modules/.pnpm/dexie@4.3.0/node_modules/dexie/dist/dexie.d.ts
|
|
448
448
|
/*
|
|
449
449
|
* Dexie.js - a minimalistic wrapper for IndexedDB
|
|
450
450
|
* ===============================================
|
|
@@ -2055,6 +2055,8 @@ interface IItem extends ICoreItem {
|
|
|
2055
2055
|
* Credit value of the item
|
|
2056
2056
|
*/
|
|
2057
2057
|
add_credit: number;
|
|
2058
|
+
/** Point value added to customer after purchase */
|
|
2059
|
+
add_point: number;
|
|
2058
2060
|
/**
|
|
2059
2061
|
* Subcategory ID of the item
|
|
2060
2062
|
*/
|
|
@@ -2160,8 +2162,8 @@ interface IItem extends ICoreItem {
|
|
|
2160
2162
|
* Combo groups (only applicable when type is ProductType.Combo)
|
|
2161
2163
|
*/
|
|
2162
2164
|
combo_groups: IComboGroup[];
|
|
2163
|
-
/** Auto
|
|
2164
|
-
|
|
2165
|
+
/** Auto-attached item UIDs that will be added when this item is added */
|
|
2166
|
+
attached_items?: string[];
|
|
2165
2167
|
}
|
|
2166
2168
|
declare class Item extends CoreItem implements IItem {
|
|
2167
2169
|
codename: string;
|
|
@@ -2170,6 +2172,7 @@ declare class Item extends CoreItem implements IItem {
|
|
|
2170
2172
|
barcode: string;
|
|
2171
2173
|
type: ProductType;
|
|
2172
2174
|
add_credit: number;
|
|
2175
|
+
add_point: number;
|
|
2173
2176
|
category_uid: string;
|
|
2174
2177
|
subcategory_uid: string;
|
|
2175
2178
|
unit: number;
|
|
@@ -2202,7 +2205,6 @@ declare class Item extends CoreItem implements IItem {
|
|
|
2202
2205
|
open_editor_panel: boolean;
|
|
2203
2206
|
open_price_editor: boolean;
|
|
2204
2207
|
combo_groups: IComboGroup[];
|
|
2205
|
-
auto_select_first_modifier?: boolean;
|
|
2206
2208
|
constructor();
|
|
2207
2209
|
}
|
|
2208
2210
|
interface IPrice extends IAppCoreModel {
|
|
@@ -2940,6 +2942,8 @@ interface IInvoiceLine extends IAppCoreModel, Omit<IInvoiceCoreLine, 'item'> {
|
|
|
2940
2942
|
modifiers: IInvoiceCoreLine[];
|
|
2941
2943
|
/** Meta data for the line item */
|
|
2942
2944
|
meta: Record<string, any>;
|
|
2945
|
+
/** Parent line UID if this line is an attached item */
|
|
2946
|
+
attached_to_line_uid?: string;
|
|
2943
2947
|
}
|
|
2944
2948
|
interface IInvoice extends IAppCoreModel {
|
|
2945
2949
|
/** Invoice reference number which is used for look-up */
|
|
@@ -3134,6 +3138,7 @@ declare class InvoiceLine extends AppCoreModel implements IInvoiceLine {
|
|
|
3134
3138
|
selected: boolean;
|
|
3135
3139
|
sales_user_uid: string;
|
|
3136
3140
|
meta: {};
|
|
3141
|
+
attached_to_line_uid?: string;
|
|
3137
3142
|
constructor();
|
|
3138
3143
|
}
|
|
3139
3144
|
declare class Invoice extends AppCoreModel implements IInvoice {
|
|
@@ -5409,6 +5414,7 @@ interface IInvoiceBaseService extends IAppRemoteService<IInvoice> {
|
|
|
5409
5414
|
calculateTaxSubtotalRatio(invoice: IInvoice): number;
|
|
5410
5415
|
calculateRewardCredit(invoice: IInvoice, aboveInvoiceAmount: number, includeServiceCharge: boolean, includeTax: any): void;
|
|
5411
5416
|
calculateAddCredit(invoice: IInvoice): void;
|
|
5417
|
+
calculateAddPoint(invoice: IInvoice): void;
|
|
5412
5418
|
calculateRewardPoint(invoice: IInvoice, aboveInvoiceAmount: number, includeServiceCharge: boolean, includeTax: boolean): void;
|
|
5413
5419
|
calculateChangeAmount(invoice: IInvoice): void;
|
|
5414
5420
|
calculateInvoiceCharges(invoice: IInvoice, flow: CalcFlow): void;
|
|
@@ -5510,6 +5516,7 @@ declare class InvoiceBaseService extends AppRemoteService<IInvoice> implements I
|
|
|
5510
5516
|
*/
|
|
5511
5517
|
calculateRewardCredit(invoice: IInvoice, aboveInvoiceAmount: number, includeServiceCharge: boolean, includeTax: boolean): void;
|
|
5512
5518
|
calculateAddCredit(invoice: IInvoice): void;
|
|
5519
|
+
calculateAddPoint(invoice: IInvoice): void;
|
|
5513
5520
|
/**
|
|
5514
5521
|
* Calculates and sets the rewarded points for the given invoice based on various conditions.
|
|
5515
5522
|
* @param invoice - The invoice to calculate rewarded points for.
|
|
@@ -5561,6 +5568,10 @@ interface ILineOperationService extends IInvoiceBaseService {
|
|
|
5561
5568
|
* @returns The updated invoice.
|
|
5562
5569
|
*/
|
|
5563
5570
|
duplicateLine(invoice: IInvoice, line: IInvoiceLine): IInvoice;
|
|
5571
|
+
/** Adds attached items to a parent line */
|
|
5572
|
+
addAttachedItemsToLine(invoice: IInvoice, parentLine: IInvoiceLine, attachedItems: IItem[], customer: ICustomer, appConfig: IAppConfig): IInvoiceLine[];
|
|
5573
|
+
/** Gets all lines attached to a parent line */
|
|
5574
|
+
getAttachedLines(invoice: IInvoice, parentLineUid: string): IInvoiceLine[];
|
|
5564
5575
|
/**
|
|
5565
5576
|
* Calibrates the duplicates in an invoice.
|
|
5566
5577
|
* @param invoice - The invoice to calibrate the duplicates in.
|
|
@@ -5696,6 +5707,10 @@ interface ILineOperationService extends IInvoiceBaseService {
|
|
|
5696
5707
|
declare class LineOperationService extends InvoiceBaseService implements ILineOperationService {
|
|
5697
5708
|
addItemToLine(invoice: IInvoice, customer: ICustomer, appConfig: IAppConfig, item: IItem, modifiers?: IInvoiceCoreLine[], lineOptions?: LineOptions, createNewLine?: boolean, comboLineUid?: string, comboGroupUid?: string): IInvoiceLine;
|
|
5698
5709
|
duplicateLine(invoice: IInvoice, line: IInvoiceLine): IInvoice;
|
|
5710
|
+
/** Adds attached items to a parent line */
|
|
5711
|
+
addAttachedItemsToLine(invoice: IInvoice, parentLine: IInvoiceLine, attachedItems: IItem[], customer: ICustomer, appConfig: IAppConfig): IInvoiceLine[];
|
|
5712
|
+
/** Gets all lines attached to a parent line */
|
|
5713
|
+
getAttachedLines(invoice: IInvoice, parentLineUid: string): IInvoiceLine[];
|
|
5699
5714
|
calibrateDuplicates(invoice: IInvoice): IInvoice;
|
|
5700
5715
|
toInvoiceCoreLine(modifier: ICoreItem, quantity?: number): IInvoiceCoreLine;
|
|
5701
5716
|
addModifier(modifiers: IInvoiceCoreLine[], modifier: IInvoiceCoreLine): IInvoiceCoreLine[];
|