asv-hlps 1.4.49 → 1.4.51

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.
@@ -7,7 +7,7 @@ export default interface Spent {
7
7
  ref?: string;
8
8
  store?: string;
9
9
  description?: string;
10
- amount?: string;
10
+ amount?: string | number;
11
11
  via?: string;
12
12
  entries?: Entry[];
13
13
  encoder?: User;
@@ -1,7 +1,26 @@
1
1
  import Entry from "./models/Entry";
2
- import EntryLine from "./models/EntryLine";
2
+ import { EntryLine } from "./models/EntryLine";
3
3
  declare class HlpEntry {
4
- sortAccount: (tobs: EntryLine[], accountDirection: boolean) => EntryLine[];
4
+ sortAccount: (tobs: EntryLine[], accountDirection: boolean) => Partial<{
5
+ id: number;
6
+ createdAt?: Date;
7
+ bill: import("..").Bill;
8
+ amountTva?: number;
9
+ amountProductHt?: number;
10
+ accountTva: number;
11
+ accountClient: number;
12
+ product: import("..").Product;
13
+ client: import("..").User;
14
+ designation: string;
15
+ account?: number;
16
+ accountDebit?: number;
17
+ accountCredit?: number;
18
+ amountDebit: number;
19
+ amountCredit: number;
20
+ isCredit?: boolean;
21
+ isDebit?: boolean;
22
+ lines: EntryLine[];
23
+ }>[];
5
24
  amountSold: (tob: any) => number;
6
25
  amountSoldDebit: (tob: any) => number;
7
26
  amountSoldCredit: (tob: any) => number;
@@ -47,17 +47,17 @@ class HlpEntry {
47
47
  // return this.amountSold(tob) >= 0 ? this.amountSold(tob): '' ;
48
48
  };
49
49
  this.entriesTotalAmountCredit = (entries) => {
50
- entries.map((entry) => {
50
+ entries.map(entry => {
51
51
  return this.totalAmountCredit(entry.lines);
52
52
  });
53
53
  };
54
54
  this.entriesTotalAmountSold = (entries) => {
55
- entries.map((entry) => {
55
+ entries.map(entry => {
56
56
  return this.totalAmountSold(entry.lines);
57
57
  });
58
58
  };
59
59
  this.entriesTotalAmountDedit = (entries) => {
60
- entries.map((entry) => {
60
+ entries.map(entry => {
61
61
  return this.totalAmountDebit(entry.lines);
62
62
  });
63
63
  };
@@ -4,7 +4,7 @@ import Spent from "../../cashs/models/Spent";
4
4
  import Product from "../../products/models/Product";
5
5
  import User from "../../users/models/User";
6
6
  import EntryCat from "./EntryCat";
7
- import EntryLine from "./EntryLine";
7
+ import { EntryLine } from "./EntryLine";
8
8
  import OhadaCat from "./ohada/OhadaCat";
9
9
  export default interface Entry {
10
10
  id?: number;
@@ -1,5 +1,5 @@
1
1
  export default interface EntryAccount {
2
- id: number;
3
- name: string;
2
+ id?: number;
3
+ name?: string;
4
4
  account?: string;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import Bill from "../../bills/models/Bill";
2
2
  import Product from "../../products/models/Product";
3
3
  import User from "../../users/models/User";
4
- export default interface EntryLine {
4
+ export type EntryLine = Partial<{
5
5
  id: number;
6
6
  createdAt?: Date;
7
7
  bill: Bill;
@@ -20,4 +20,4 @@ export default interface EntryLine {
20
20
  isCredit?: boolean;
21
21
  isDebit?: boolean;
22
22
  lines: EntryLine[];
23
- }
23
+ }>;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ // export type dfdf = Partial <EntryLine>
@@ -1,5 +1,5 @@
1
1
  export { default as Entry } from "./Entry";
2
2
  export { default as EntryAccount } from "./EntryAccount";
3
3
  export { default as EntryCat } from "./EntryCat";
4
- export { default as EntryLine } from "./EntryLine";
4
+ export { EntryLine } from "./EntryLine";
5
5
  export * from "./ohada";
@@ -7,7 +7,7 @@ export default interface Spent {
7
7
  ref?: string;
8
8
  store?: string;
9
9
  description?: string;
10
- amount?: string;
10
+ amount?: string | number;
11
11
  via?: string;
12
12
  entries?: Entry[];
13
13
  encoder?: User;
@@ -1,7 +1,26 @@
1
1
  import Entry from "./models/Entry";
2
- import EntryLine from "./models/EntryLine";
2
+ import { EntryLine } from "./models/EntryLine";
3
3
  declare class HlpEntry {
4
- sortAccount: (tobs: EntryLine[], accountDirection: boolean) => EntryLine[];
4
+ sortAccount: (tobs: EntryLine[], accountDirection: boolean) => Partial<{
5
+ id: number;
6
+ createdAt?: Date;
7
+ bill: import("..").Bill;
8
+ amountTva?: number;
9
+ amountProductHt?: number;
10
+ accountTva: number;
11
+ accountClient: number;
12
+ product: import("..").Product;
13
+ client: import("..").User;
14
+ designation: string;
15
+ account?: number;
16
+ accountDebit?: number;
17
+ accountCredit?: number;
18
+ amountDebit: number;
19
+ amountCredit: number;
20
+ isCredit?: boolean;
21
+ isDebit?: boolean;
22
+ lines: EntryLine[];
23
+ }>[];
5
24
  amountSold: (tob: any) => number;
6
25
  amountSoldDebit: (tob: any) => number;
7
26
  amountSoldCredit: (tob: any) => number;
@@ -45,17 +45,17 @@ class HlpEntry {
45
45
  // return this.amountSold(tob) >= 0 ? this.amountSold(tob): '' ;
46
46
  };
47
47
  this.entriesTotalAmountCredit = (entries) => {
48
- entries.map((entry) => {
48
+ entries.map(entry => {
49
49
  return this.totalAmountCredit(entry.lines);
50
50
  });
51
51
  };
52
52
  this.entriesTotalAmountSold = (entries) => {
53
- entries.map((entry) => {
53
+ entries.map(entry => {
54
54
  return this.totalAmountSold(entry.lines);
55
55
  });
56
56
  };
57
57
  this.entriesTotalAmountDedit = (entries) => {
58
- entries.map((entry) => {
58
+ entries.map(entry => {
59
59
  return this.totalAmountDebit(entry.lines);
60
60
  });
61
61
  };
@@ -4,7 +4,7 @@ import Spent from "../../cashs/models/Spent";
4
4
  import Product from "../../products/models/Product";
5
5
  import User from "../../users/models/User";
6
6
  import EntryCat from "./EntryCat";
7
- import EntryLine from "./EntryLine";
7
+ import { EntryLine } from "./EntryLine";
8
8
  import OhadaCat from "./ohada/OhadaCat";
9
9
  export default interface Entry {
10
10
  id?: number;
@@ -1,5 +1,5 @@
1
1
  export default interface EntryAccount {
2
- id: number;
3
- name: string;
2
+ id?: number;
3
+ name?: string;
4
4
  account?: string;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import Bill from "../../bills/models/Bill";
2
2
  import Product from "../../products/models/Product";
3
3
  import User from "../../users/models/User";
4
- export default interface EntryLine {
4
+ export type EntryLine = Partial<{
5
5
  id: number;
6
6
  createdAt?: Date;
7
7
  bill: Bill;
@@ -20,4 +20,4 @@ export default interface EntryLine {
20
20
  isCredit?: boolean;
21
21
  isDebit?: boolean;
22
22
  lines: EntryLine[];
23
- }
23
+ }>;
@@ -1 +1,2 @@
1
1
  export {};
2
+ // export type dfdf = Partial <EntryLine>
@@ -1,5 +1,5 @@
1
1
  export { default as Entry } from "./Entry";
2
2
  export { default as EntryAccount } from "./EntryAccount";
3
3
  export { default as EntryCat } from "./EntryCat";
4
- export { default as EntryLine } from "./EntryLine";
4
+ export { EntryLine } from "./EntryLine";
5
5
  export * from "./ohada";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.4.49",
3
+ "version": "1.4.51",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",