capacitor-hugin-gmp3 0.2.2 → 0.2.3
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/README.md +5 -72
- package/android/src/main/java/com/kerzz/hugin/gmp3/CapacitorHuginGMP3Plugin.java +1 -0
- package/android/src/main/java/com/kerzz/hugin/gmp3/PrinterCoverService.java +57 -7
- package/dist/docs.json +2 -246
- package/dist/esm/definitions.d.ts +22 -6
- package/dist/esm/definitions.js +34 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +4 -1
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +37 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +37 -0
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,9 +77,9 @@ Sale(options: { saleItem: SaleItem; }) => Promise<{ orderNo?: number; result: bo
|
|
|
77
77
|
|
|
78
78
|
Satış işlemi başlatır.
|
|
79
79
|
|
|
80
|
-
| Param | Type
|
|
81
|
-
| ------------- |
|
|
82
|
-
| **`options`** | <code>{ saleItem:
|
|
80
|
+
| Param | Type | Description |
|
|
81
|
+
| ------------- | ------------------------------------ | ----------------------------------- |
|
|
82
|
+
| **`options`** | <code>{ saleItem: SaleItem; }</code> | Satış nesnesi (JSON string olarak). |
|
|
83
83
|
|
|
84
84
|
**Returns:** <code>Promise<{ orderNo?: number; result: boolean; message?: string; }></code>
|
|
85
85
|
|
|
@@ -119,12 +119,12 @@ Z raporu yazdırır.
|
|
|
119
119
|
### GetVatRates()
|
|
120
120
|
|
|
121
121
|
```typescript
|
|
122
|
-
GetVatRates() => Promise<string[]>
|
|
122
|
+
GetVatRates() => Promise<{ result: boolean; vatRates: string[]; }>
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
Kayıtlı KDV oranlarını getirir.
|
|
126
126
|
|
|
127
|
-
**Returns:** <code>Promise<string[]></code>
|
|
127
|
+
**Returns:** <code>Promise<{ result: boolean; vatRates: string[]; }></code>
|
|
128
128
|
|
|
129
129
|
--------------------
|
|
130
130
|
|
|
@@ -190,73 +190,6 @@ Bağlantı ayarları.
|
|
|
190
190
|
| **`port`** | <code>number</code> | Cihaz port numarası. |
|
|
191
191
|
|
|
192
192
|
|
|
193
|
-
#### SaleItem
|
|
194
|
-
|
|
195
|
-
Satış bilgisi.
|
|
196
|
-
|
|
197
|
-
| Prop | Type | Description |
|
|
198
|
-
| ---------------------- | ------------------------------------------------------------- | ---------------------------- |
|
|
199
|
-
| **`FiscalItems`** | <code>FiscalItem[]</code> | Satışta yer alan ürünler. |
|
|
200
|
-
| **`Adjustments`** | <code>Adj[]</code> | Satışa uygulanan indirimler. |
|
|
201
|
-
| **`Payments`** | <code>Payment[]</code> | Ödeme bilgileri. |
|
|
202
|
-
| **`FooterNotes`** | <code>string[]</code> | Fiş altı notları. |
|
|
203
|
-
| **`EndOfReceiptInfo`** | <code><a href="#endofreceiptinfo">EndOfReceiptInfo</a></code> | Fiş kapanış bilgisi. |
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
#### FiscalItem
|
|
207
|
-
|
|
208
|
-
Satışta yer alan ürün bilgisi.
|
|
209
|
-
|
|
210
|
-
| Prop | Type | Description |
|
|
211
|
-
| --------------- | ------------------------------------------- | ------------------- |
|
|
212
|
-
| **`Id`** | <code>number</code> | Ürün ID. |
|
|
213
|
-
| **`Quantity`** | <code>number</code> | Miktar. |
|
|
214
|
-
| **`Price`** | <code>number</code> | Fiyat. |
|
|
215
|
-
| **`Name`** | <code>string</code> | Ürün adı. |
|
|
216
|
-
| **`DeptId`** | <code>number</code> | Departman ID. |
|
|
217
|
-
| **`Status`** | <code>number</code> | Ürün durumu. |
|
|
218
|
-
| **`Adj`** | <code><a href="#adj">Adj</a> \| null</code> | Ürüne özel indirim. |
|
|
219
|
-
| **`NoteLine1`** | <code>string \| null</code> | Not satırı 1. |
|
|
220
|
-
| **`NoteLine2`** | <code>string \| null</code> | Not satırı 2. |
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
#### Adj
|
|
224
|
-
|
|
225
|
-
İndirim bilgisi.
|
|
226
|
-
|
|
227
|
-
| Prop | Type | Description |
|
|
228
|
-
| ---------------- | --------------------------- | ---------------- |
|
|
229
|
-
| **`Type`** | <code>number</code> | İndirim tipi. |
|
|
230
|
-
| **`Amount`** | <code>number</code> | İndirim tutarı. |
|
|
231
|
-
| **`percentage`** | <code>number</code> | İndirim yüzdesi. |
|
|
232
|
-
| **`NoteLine1`** | <code>string \| null</code> | Not satırı 1. |
|
|
233
|
-
| **`NoteLine2`** | <code>string \| null</code> | Not satırı 2. |
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
#### Payment
|
|
237
|
-
|
|
238
|
-
Ödeme bilgileri.
|
|
239
|
-
|
|
240
|
-
| Prop | Type | Description |
|
|
241
|
-
| ---------------- | -------------------- | ------------------------------- |
|
|
242
|
-
| **`Type`** | <code>number</code> | Ödeme tipi (örn: nakit, kredi). |
|
|
243
|
-
| **`Index`** | <code>number</code> | Ödeme indexi. |
|
|
244
|
-
| **`PaidTotal`** | <code>number</code> | Ödenen toplam tutar. |
|
|
245
|
-
| **`viaByEFT`** | <code>boolean</code> | EFT ile mi yapıldı? |
|
|
246
|
-
| **`SequenceNo`** | <code>number</code> | Sıra numarası. |
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
#### EndOfReceiptInfo
|
|
250
|
-
|
|
251
|
-
Fiş kapanış bilgileri.
|
|
252
|
-
|
|
253
|
-
| Prop | Type | Description |
|
|
254
|
-
| ---------------------- | --------------------------- | ------------------- |
|
|
255
|
-
| **`CloseReceiptFlag`** | <code>boolean</code> | Fişi kapat. |
|
|
256
|
-
| **`BarcodeFlag`** | <code>boolean</code> | Barkod basılsın mı? |
|
|
257
|
-
| **`Barcode`** | <code>string \| null</code> | Barkod numarası. |
|
|
258
|
-
|
|
259
|
-
|
|
260
193
|
#### Department
|
|
261
194
|
|
|
262
195
|
Departman bilgisi.
|
|
@@ -109,6 +109,7 @@ public class CapacitorHuginGMP3Plugin extends Plugin {
|
|
|
109
109
|
String response = printerService.Sale(saleItem.toString());
|
|
110
110
|
Log.i(TAG, "Sale Response: " + response);
|
|
111
111
|
JSObject res = new JSObject();
|
|
112
|
+
|
|
112
113
|
if(!response.equals("-1")) {
|
|
113
114
|
|
|
114
115
|
res.put("orderNo", response);
|
|
@@ -7,6 +7,12 @@ import android.os.IBinder;
|
|
|
7
7
|
import android.os.RemoteException;
|
|
8
8
|
import android.util.Log;
|
|
9
9
|
|
|
10
|
+
import com.getcapacitor.JSArray;
|
|
11
|
+
import com.getcapacitor.JSObject;
|
|
12
|
+
|
|
13
|
+
import org.json.JSONArray;
|
|
14
|
+
import org.json.JSONObject;
|
|
15
|
+
|
|
10
16
|
import gmp3.droid.printer.DeviceInfo;
|
|
11
17
|
import gmp3.droid.printer.HuginPrinter;
|
|
12
18
|
import gmp3.droid.printer.Utility;
|
|
@@ -86,18 +92,62 @@ public class PrinterCoverService extends Service {
|
|
|
86
92
|
public String Sale(String saleItem) throws RemoteException {
|
|
87
93
|
try {
|
|
88
94
|
printer.VoidReceipt();
|
|
95
|
+
JSONObject jsObjectSale = new JSONObject(saleItem);
|
|
96
|
+
JSObject saleItems = new JSObject();
|
|
97
|
+
saleItems.put("FiscalItems", (jsObjectSale.getJSONArray("FiscalItems")));
|
|
98
|
+
saleItems.put("Adjustments", (jsObjectSale.getJSONArray("Adjustments")));
|
|
99
|
+
saleItems.put("Payments", new JSArray());
|
|
100
|
+
saleItems.put("EndOfReceiptInfo", jsObjectSale.getJSONObject("EndOfReceiptInfo"));
|
|
101
|
+
saleItems.put("FooterNotes", (jsObjectSale.getJSONArray("FooterNotes")));
|
|
102
|
+
JSONArray payments = jsObjectSale.getJSONArray("Payments");
|
|
103
|
+
|
|
89
104
|
String res = printer.CheckPrinterStatus();
|
|
90
105
|
Log.i(TAG, res);
|
|
91
106
|
String result = printer.PrintDocumentHeader();
|
|
92
|
-
Log.i(TAG,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
107
|
+
Log.i(TAG, saleItems.toString());
|
|
108
|
+
|
|
109
|
+
String str = printer.PrintJSONDocumentDeptOnly(saleItems.toString());
|
|
110
|
+
|
|
111
|
+
JSONArray otherPayments = new JSONArray();
|
|
112
|
+
Double totalCreditPayment = 0.0;
|
|
113
|
+
for (var i = 0; i < payments.length(); i++) {
|
|
114
|
+
JSONObject payment = new JSONObject(payments.getJSONObject(i).toString());
|
|
115
|
+
if(payment.getInt("Type") == 99) {
|
|
116
|
+
totalCreditPayment = payment.getDouble("PaidTotal");
|
|
117
|
+
} else {
|
|
118
|
+
otherPayments.put(payment);
|
|
119
|
+
}
|
|
98
120
|
}
|
|
99
|
-
|
|
121
|
+
String creditPayment = "0";
|
|
122
|
+
if(totalCreditPayment > 0.0) {
|
|
123
|
+
creditPayment = printer.GetEFTAuthorisation(totalCreditPayment, 0, "");
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if(creditPayment.startsWith("0")) {
|
|
127
|
+
for (var i = 0; i < otherPayments.length(); i++) {
|
|
128
|
+
JSONObject payment = new JSONObject(payments.getJSONObject(i).toString());
|
|
129
|
+
printer.PrintPayment(payment.getInt("Type"), i, payment.getDouble("PaidTotal"));
|
|
130
|
+
}
|
|
131
|
+
Log.i(TAG, creditPayment);
|
|
132
|
+
|
|
133
|
+
String closeReceipt = printer.CloseReceipt(true);
|
|
134
|
+
|
|
135
|
+
Log.i(TAG, str);
|
|
136
|
+
String[] response = printResponse(closeReceipt);
|
|
137
|
+
if(response[0].equals("0")) {
|
|
138
|
+
return response[2];
|
|
139
|
+
}
|
|
140
|
+
return "-1";
|
|
141
|
+
} else {
|
|
142
|
+
printer.VoidReceipt();
|
|
143
|
+
return "-1";
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
100
147
|
} catch (Exception e) {
|
|
148
|
+
Log.i(TAG, e.toString());
|
|
149
|
+
printer.VoidPayment(0);
|
|
150
|
+
printer.VoidReceipt();
|
|
101
151
|
return "-1";
|
|
102
152
|
}
|
|
103
153
|
}
|
package/dist/docs.json
CHANGED
|
@@ -94,9 +94,9 @@
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"name": "GetVatRates",
|
|
97
|
-
"signature": "() => Promise<string[]>",
|
|
97
|
+
"signature": "() => Promise<{ result: boolean; vatRates: string[]; }>",
|
|
98
98
|
"parameters": [],
|
|
99
|
-
"returns": "Promise<string[]>",
|
|
99
|
+
"returns": "Promise<{ result: boolean; vatRates: string[]; }>",
|
|
100
100
|
"tags": [],
|
|
101
101
|
"docs": "Kayıtlı KDV oranlarını getirir.",
|
|
102
102
|
"complexTypes": [],
|
|
@@ -194,250 +194,6 @@
|
|
|
194
194
|
}
|
|
195
195
|
]
|
|
196
196
|
},
|
|
197
|
-
{
|
|
198
|
-
"name": "SaleItem",
|
|
199
|
-
"slug": "saleitem",
|
|
200
|
-
"docs": "Satış bilgisi.",
|
|
201
|
-
"tags": [],
|
|
202
|
-
"methods": [],
|
|
203
|
-
"properties": [
|
|
204
|
-
{
|
|
205
|
-
"name": "FiscalItems",
|
|
206
|
-
"tags": [],
|
|
207
|
-
"docs": "Satışta yer alan ürünler.",
|
|
208
|
-
"complexTypes": [
|
|
209
|
-
"FiscalItem"
|
|
210
|
-
],
|
|
211
|
-
"type": "FiscalItem[]"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"name": "Adjustments",
|
|
215
|
-
"tags": [],
|
|
216
|
-
"docs": "Satışa uygulanan indirimler.",
|
|
217
|
-
"complexTypes": [
|
|
218
|
-
"Adj"
|
|
219
|
-
],
|
|
220
|
-
"type": "Adj[]"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"name": "Payments",
|
|
224
|
-
"tags": [],
|
|
225
|
-
"docs": "Ödeme bilgileri.",
|
|
226
|
-
"complexTypes": [
|
|
227
|
-
"Payment"
|
|
228
|
-
],
|
|
229
|
-
"type": "Payment[]"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"name": "FooterNotes",
|
|
233
|
-
"tags": [],
|
|
234
|
-
"docs": "Fiş altı notları.",
|
|
235
|
-
"complexTypes": [],
|
|
236
|
-
"type": "string[]"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"name": "EndOfReceiptInfo",
|
|
240
|
-
"tags": [],
|
|
241
|
-
"docs": "Fiş kapanış bilgisi.",
|
|
242
|
-
"complexTypes": [
|
|
243
|
-
"EndOfReceiptInfo"
|
|
244
|
-
],
|
|
245
|
-
"type": "EndOfReceiptInfo"
|
|
246
|
-
}
|
|
247
|
-
]
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"name": "FiscalItem",
|
|
251
|
-
"slug": "fiscalitem",
|
|
252
|
-
"docs": "Satışta yer alan ürün bilgisi.",
|
|
253
|
-
"tags": [],
|
|
254
|
-
"methods": [],
|
|
255
|
-
"properties": [
|
|
256
|
-
{
|
|
257
|
-
"name": "Id",
|
|
258
|
-
"tags": [],
|
|
259
|
-
"docs": "Ürün ID.",
|
|
260
|
-
"complexTypes": [],
|
|
261
|
-
"type": "number"
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"name": "Quantity",
|
|
265
|
-
"tags": [],
|
|
266
|
-
"docs": "Miktar.",
|
|
267
|
-
"complexTypes": [],
|
|
268
|
-
"type": "number"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"name": "Price",
|
|
272
|
-
"tags": [],
|
|
273
|
-
"docs": "Fiyat.",
|
|
274
|
-
"complexTypes": [],
|
|
275
|
-
"type": "number"
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"name": "Name",
|
|
279
|
-
"tags": [],
|
|
280
|
-
"docs": "Ürün adı.",
|
|
281
|
-
"complexTypes": [],
|
|
282
|
-
"type": "string"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"name": "DeptId",
|
|
286
|
-
"tags": [],
|
|
287
|
-
"docs": "Departman ID.",
|
|
288
|
-
"complexTypes": [],
|
|
289
|
-
"type": "number"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"name": "Status",
|
|
293
|
-
"tags": [],
|
|
294
|
-
"docs": "Ürün durumu.",
|
|
295
|
-
"complexTypes": [],
|
|
296
|
-
"type": "number"
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"name": "Adj",
|
|
300
|
-
"tags": [],
|
|
301
|
-
"docs": "Ürüne özel indirim.",
|
|
302
|
-
"complexTypes": [
|
|
303
|
-
"Adj"
|
|
304
|
-
],
|
|
305
|
-
"type": "Adj | null"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"name": "NoteLine1",
|
|
309
|
-
"tags": [],
|
|
310
|
-
"docs": "Not satırı 1.",
|
|
311
|
-
"complexTypes": [],
|
|
312
|
-
"type": "string | null"
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
"name": "NoteLine2",
|
|
316
|
-
"tags": [],
|
|
317
|
-
"docs": "Not satırı 2.",
|
|
318
|
-
"complexTypes": [],
|
|
319
|
-
"type": "string | null"
|
|
320
|
-
}
|
|
321
|
-
]
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
"name": "Adj",
|
|
325
|
-
"slug": "adj",
|
|
326
|
-
"docs": "İndirim bilgisi.",
|
|
327
|
-
"tags": [],
|
|
328
|
-
"methods": [],
|
|
329
|
-
"properties": [
|
|
330
|
-
{
|
|
331
|
-
"name": "Type",
|
|
332
|
-
"tags": [],
|
|
333
|
-
"docs": "İndirim tipi.",
|
|
334
|
-
"complexTypes": [],
|
|
335
|
-
"type": "number"
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
"name": "Amount",
|
|
339
|
-
"tags": [],
|
|
340
|
-
"docs": "İndirim tutarı.",
|
|
341
|
-
"complexTypes": [],
|
|
342
|
-
"type": "number"
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
"name": "percentage",
|
|
346
|
-
"tags": [],
|
|
347
|
-
"docs": "İndirim yüzdesi.",
|
|
348
|
-
"complexTypes": [],
|
|
349
|
-
"type": "number"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"name": "NoteLine1",
|
|
353
|
-
"tags": [],
|
|
354
|
-
"docs": "Not satırı 1.",
|
|
355
|
-
"complexTypes": [],
|
|
356
|
-
"type": "string | null"
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"name": "NoteLine2",
|
|
360
|
-
"tags": [],
|
|
361
|
-
"docs": "Not satırı 2.",
|
|
362
|
-
"complexTypes": [],
|
|
363
|
-
"type": "string | null"
|
|
364
|
-
}
|
|
365
|
-
]
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"name": "Payment",
|
|
369
|
-
"slug": "payment",
|
|
370
|
-
"docs": "Ödeme bilgileri.",
|
|
371
|
-
"tags": [],
|
|
372
|
-
"methods": [],
|
|
373
|
-
"properties": [
|
|
374
|
-
{
|
|
375
|
-
"name": "Type",
|
|
376
|
-
"tags": [],
|
|
377
|
-
"docs": "Ödeme tipi (örn: nakit, kredi).",
|
|
378
|
-
"complexTypes": [],
|
|
379
|
-
"type": "number"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"name": "Index",
|
|
383
|
-
"tags": [],
|
|
384
|
-
"docs": "Ödeme indexi.",
|
|
385
|
-
"complexTypes": [],
|
|
386
|
-
"type": "number"
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
"name": "PaidTotal",
|
|
390
|
-
"tags": [],
|
|
391
|
-
"docs": "Ödenen toplam tutar.",
|
|
392
|
-
"complexTypes": [],
|
|
393
|
-
"type": "number"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"name": "viaByEFT",
|
|
397
|
-
"tags": [],
|
|
398
|
-
"docs": "EFT ile mi yapıldı?",
|
|
399
|
-
"complexTypes": [],
|
|
400
|
-
"type": "boolean"
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
"name": "SequenceNo",
|
|
404
|
-
"tags": [],
|
|
405
|
-
"docs": "Sıra numarası.",
|
|
406
|
-
"complexTypes": [],
|
|
407
|
-
"type": "number"
|
|
408
|
-
}
|
|
409
|
-
]
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
"name": "EndOfReceiptInfo",
|
|
413
|
-
"slug": "endofreceiptinfo",
|
|
414
|
-
"docs": "Fiş kapanış bilgileri.",
|
|
415
|
-
"tags": [],
|
|
416
|
-
"methods": [],
|
|
417
|
-
"properties": [
|
|
418
|
-
{
|
|
419
|
-
"name": "CloseReceiptFlag",
|
|
420
|
-
"tags": [],
|
|
421
|
-
"docs": "Fişi kapat.",
|
|
422
|
-
"complexTypes": [],
|
|
423
|
-
"type": "boolean"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"name": "BarcodeFlag",
|
|
427
|
-
"tags": [],
|
|
428
|
-
"docs": "Barkod basılsın mı?",
|
|
429
|
-
"complexTypes": [],
|
|
430
|
-
"type": "boolean"
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
"name": "Barcode",
|
|
434
|
-
"tags": [],
|
|
435
|
-
"docs": "Barkod numarası.",
|
|
436
|
-
"complexTypes": [],
|
|
437
|
-
"type": "string | null"
|
|
438
|
-
}
|
|
439
|
-
]
|
|
440
|
-
},
|
|
441
197
|
{
|
|
442
198
|
"name": "Department",
|
|
443
199
|
"slug": "department",
|
|
@@ -43,7 +43,10 @@ export interface CapacitorHuginGMP3Plugin {
|
|
|
43
43
|
/**
|
|
44
44
|
* Kayıtlı KDV oranlarını getirir.
|
|
45
45
|
*/
|
|
46
|
-
GetVatRates(): Promise<
|
|
46
|
+
GetVatRates(): Promise<{
|
|
47
|
+
result: boolean;
|
|
48
|
+
vatRates: string[];
|
|
49
|
+
}>;
|
|
47
50
|
/**
|
|
48
51
|
* Tanımlı departmanları getirir.
|
|
49
52
|
*/
|
|
@@ -103,7 +106,7 @@ export interface Department {
|
|
|
103
106
|
/**
|
|
104
107
|
* Satış bilgisi.
|
|
105
108
|
*/
|
|
106
|
-
export
|
|
109
|
+
export declare class SaleItem {
|
|
107
110
|
/** Satışta yer alan ürünler. */
|
|
108
111
|
FiscalItems: FiscalItem[];
|
|
109
112
|
/** Satışa uygulanan indirimler. */
|
|
@@ -114,24 +117,26 @@ export interface SaleItem {
|
|
|
114
117
|
FooterNotes: string[];
|
|
115
118
|
/** Fiş kapanış bilgisi. */
|
|
116
119
|
EndOfReceiptInfo: EndOfReceiptInfo;
|
|
120
|
+
constructor();
|
|
117
121
|
}
|
|
118
122
|
/**
|
|
119
123
|
* Fiş kapanış bilgileri.
|
|
120
124
|
*/
|
|
121
|
-
|
|
125
|
+
export declare class EndOfReceiptInfo {
|
|
122
126
|
/** Fişi kapat. */
|
|
123
|
-
CloseReceiptFlag
|
|
127
|
+
protected readonly CloseReceiptFlag?: boolean;
|
|
124
128
|
/** Barkod basılsın mı? */
|
|
125
129
|
BarcodeFlag: boolean;
|
|
126
130
|
/** Barkod numarası. */
|
|
127
131
|
Barcode: string | null;
|
|
132
|
+
constructor();
|
|
128
133
|
}
|
|
129
134
|
/**
|
|
130
135
|
* Ödeme bilgileri.
|
|
131
136
|
*/
|
|
132
137
|
interface Payment {
|
|
133
|
-
/** Ödeme tipi (örn: nakit, kredi). */
|
|
134
|
-
Type:
|
|
138
|
+
/** Ödeme tipi (örn: nakit, kredi vb.). */
|
|
139
|
+
Type: PaymentType;
|
|
135
140
|
/** Ödeme indexi. */
|
|
136
141
|
Index: number;
|
|
137
142
|
/** Ödenen toplam tutar. */
|
|
@@ -141,6 +146,17 @@ interface Payment {
|
|
|
141
146
|
/** Sıra numarası. */
|
|
142
147
|
SequenceNo: number;
|
|
143
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Ödeme tipleri. Özel Modeldir. Ödemelerde kredi kartı önceliklidir.
|
|
151
|
+
*/
|
|
152
|
+
export declare enum PaymentType {
|
|
153
|
+
Nakit = 0,
|
|
154
|
+
Kredi = 1,
|
|
155
|
+
Cek = 2,
|
|
156
|
+
Doviz = 3,
|
|
157
|
+
YemekKarti = 5,
|
|
158
|
+
KrediKarti = 99
|
|
159
|
+
}
|
|
144
160
|
/**
|
|
145
161
|
* Satışta yer alan ürün bilgisi.
|
|
146
162
|
*/
|
package/dist/esm/definitions.js
CHANGED
|
@@ -1,2 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Satış bilgisi.
|
|
3
|
+
*/
|
|
4
|
+
export class SaleItem {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.FiscalItems = [];
|
|
7
|
+
this.Adjustments = [];
|
|
8
|
+
this.Payments = [];
|
|
9
|
+
this.FooterNotes = [];
|
|
10
|
+
this.EndOfReceiptInfo = new EndOfReceiptInfo();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Fiş kapanış bilgileri.
|
|
15
|
+
*/
|
|
16
|
+
export class EndOfReceiptInfo {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.CloseReceiptFlag = false;
|
|
19
|
+
this.Barcode = '';
|
|
20
|
+
this.BarcodeFlag = false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Ödeme tipleri. Özel Modeldir. Ödemelerde kredi kartı önceliklidir.
|
|
25
|
+
*/
|
|
26
|
+
export var PaymentType;
|
|
27
|
+
(function (PaymentType) {
|
|
28
|
+
PaymentType[PaymentType["Nakit"] = 0] = "Nakit";
|
|
29
|
+
PaymentType[PaymentType["Kredi"] = 1] = "Kredi";
|
|
30
|
+
PaymentType[PaymentType["Cek"] = 2] = "Cek";
|
|
31
|
+
PaymentType[PaymentType["Doviz"] = 3] = "Doviz";
|
|
32
|
+
PaymentType[PaymentType["YemekKarti"] = 5] = "YemekKarti";
|
|
33
|
+
PaymentType[PaymentType["KrediKarti"] = 99] = "KrediKarti";
|
|
34
|
+
})(PaymentType || (PaymentType = {}));
|
|
2
35
|
//# sourceMappingURL=definitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Ana plugin arayüzü. Hugin printer ile iletişim sağlayan tüm metodları tanımlar.\n */\nexport interface CapacitorHuginGMP3Plugin {\n /**\n * Kütüphane sürümünü döner.\n */\n GetLibraryVersion(): Promise<{ version: string }>;\n\n /**\n * Cihaza bağlantı kurar.\n * @param options Bağlantı bilgileri.\n */\n Connect(options: ConnectOptions): Promise<{ connected: boolean }>;\n\n /**\n * Satış işlemi başlatır.\n * @param options Satış nesnesi (JSON string olarak).\n */\n Sale(options: { saleItem: SaleItem }): Promise<{ orderNo?: number; result: boolean; message?: string }>;\n\n /**\n * X raporu yazdırır.\n * @param type Rapor tipi (1 | 2 | 3).\n */\n PrintXReport(type: 1 | 2 | 3): Promise<{ result: boolean; message: string }>;\n\n /**\n * Z raporu yazdırır.\n */\n PrintZReport(): Promise<{ result: boolean }>;\n\n /**\n * Kayıtlı KDV oranlarını getirir.\n */\n GetVatRates(): Promise<string[]>;\n\n /**\n * Tanımlı departmanları getirir.\n */\n GetDepartments(): Promise<Department[]>;\n\n /**\n * Departman ekler veya günceller.\n * @param Department Departman bilgileri.\n */\n SetDepartment(Department: Department): Promise<{ result: boolean }>;\n\n /**\n * Belirli bir KDV oranını ayarlar.\n * @param vatRate KDV oran bilgisi.\n */\n SetVatRate(vatRate: VatRate): Promise<{ result: boolean }>;\n}\n\n/**\n * Bağlantı ayarları.\n */\nexport interface ConnectOptions {\n /** Terminal numarası (seri numara). */\n terminalNo: string;\n /** Cihaz IP adresi. */\n ip: string;\n /** Cihaz port numarası. */\n port: number;\n}\n\n/**\n * KDV oran bilgisi.\n */\nexport interface VatRate {\n /** KDV index (0-7). */\n index: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;\n /** KDV oranı (%). */\n vatRate: number; // 0.00 - 99.99\n}\n\n/**\n * Departman bilgisi.\n */\nexport interface Department {\n /** Departman ID (1-8). */\n id: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\n /** Departman ismi. */\n name: string;\n /** Departmana atanmış KDV ID (1-8). */\n vatId: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\n /** Fiyat (0 - 999.999,99). */\n price: number;\n /** Tartılabilir mi? 0 = tartılamaz, 1 = tartılabilir. */\n weighable: 0 | 1;\n /** Opsiyonel limit. (Eğer varsa) */\n limit?: number;\n}\n\n/**\n * Satış bilgisi.\n */\nexport
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AA+FA;;GAEG;AACH,MAAM,OAAO,QAAQ;IAYnB;QACE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;IACjD,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAQ3B;QACE,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;CACF;AAkBD;;GAEG;AACH,MAAM,CAAN,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,+CAAS,CAAA;IACT,+CAAS,CAAA;IACT,2CAAO,CAAA;IACP,+CAAS,CAAA;IACT,yDAAc,CAAA;IACd,0DAAe,CAAA;AACjB,CAAC,EAPW,WAAW,KAAX,WAAW,QAOtB","sourcesContent":["/**\n * Ana plugin arayüzü. Hugin printer ile iletişim sağlayan tüm metodları tanımlar.\n */\nexport interface CapacitorHuginGMP3Plugin {\n /**\n * Kütüphane sürümünü döner.\n */\n GetLibraryVersion(): Promise<{ version: string }>;\n\n /**\n * Cihaza bağlantı kurar.\n * @param options Bağlantı bilgileri.\n */\n Connect(options: ConnectOptions): Promise<{ connected: boolean }>;\n\n /**\n * Satış işlemi başlatır.\n * @param options Satış nesnesi (JSON string olarak).\n */\n Sale(options: { saleItem: SaleItem }): Promise<{ orderNo?: number; result: boolean; message?: string }>;\n\n /**\n * X raporu yazdırır.\n * @param type Rapor tipi (1 | 2 | 3).\n */\n PrintXReport(type: 1 | 2 | 3): Promise<{ result: boolean; message: string }>;\n\n /**\n * Z raporu yazdırır.\n */\n PrintZReport(): Promise<{ result: boolean }>;\n\n /**\n * Kayıtlı KDV oranlarını getirir.\n */\n GetVatRates(): Promise<{result: boolean, vatRates: string[]}>;\n\n /**\n * Tanımlı departmanları getirir.\n */\n GetDepartments(): Promise<Department[]>;\n\n /**\n * Departman ekler veya günceller.\n * @param Department Departman bilgileri.\n */\n SetDepartment(Department: Department): Promise<{ result: boolean }>;\n\n /**\n * Belirli bir KDV oranını ayarlar.\n * @param vatRate KDV oran bilgisi.\n */\n SetVatRate(vatRate: VatRate): Promise<{ result: boolean }>;\n}\n\n/**\n * Bağlantı ayarları.\n */\nexport interface ConnectOptions {\n /** Terminal numarası (seri numara). */\n terminalNo: string;\n /** Cihaz IP adresi. */\n ip: string;\n /** Cihaz port numarası. */\n port: number;\n}\n\n/**\n * KDV oran bilgisi.\n */\nexport interface VatRate {\n /** KDV index (0-7). */\n index: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;\n /** KDV oranı (%). */\n vatRate: number; // 0.00 - 99.99\n}\n\n/**\n * Departman bilgisi.\n */\nexport interface Department {\n /** Departman ID (1-8). */\n id: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\n /** Departman ismi. */\n name: string;\n /** Departmana atanmış KDV ID (1-8). */\n vatId: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\n /** Fiyat (0 - 999.999,99). */\n price: number;\n /** Tartılabilir mi? 0 = tartılamaz, 1 = tartılabilir. */\n weighable: 0 | 1;\n /** Opsiyonel limit. (Eğer varsa) */\n limit?: number;\n}\n\n/**\n * Satış bilgisi.\n */\nexport class SaleItem {\n /** Satışta yer alan ürünler. */\n FiscalItems: FiscalItem[];\n /** Satışa uygulanan indirimler. */\n Adjustments: Adj[];\n /** Ödeme bilgileri. */\n Payments: Payment[];\n /** Fiş altı notları. */\n FooterNotes: string[];\n /** Fiş kapanış bilgisi. */\n EndOfReceiptInfo: EndOfReceiptInfo;\n\n constructor() {\n this.FiscalItems = [];\n this.Adjustments = [];\n this.Payments = [];\n this.FooterNotes = [];\n this.EndOfReceiptInfo = new EndOfReceiptInfo();\n }\n}\n\n/**\n * Fiş kapanış bilgileri.\n */\nexport class EndOfReceiptInfo {\n /** Fişi kapat. */\n protected readonly CloseReceiptFlag?: boolean;\n /** Barkod basılsın mı? */\n BarcodeFlag: boolean;\n /** Barkod numarası. */\n Barcode: string | null;\n\n constructor() {\n this.CloseReceiptFlag = false;\n this.Barcode = '';\n this.BarcodeFlag = false;\n }\n}\n\n/**\n * Ödeme bilgileri.\n */\ninterface Payment {\n /** Ödeme tipi (örn: nakit, kredi vb.). */\n Type: PaymentType;\n /** Ödeme indexi. */\n Index: number;\n /** Ödenen toplam tutar. */\n PaidTotal: number;\n /** EFT ile mi yapıldı? */\n viaByEFT: boolean;\n /** Sıra numarası. */\n SequenceNo: number;\n}\n\n/**\n * Ödeme tipleri. Özel Modeldir. Ödemelerde kredi kartı önceliklidir.\n */\nexport enum PaymentType {\n Nakit = 0,\n Kredi = 1,\n Cek = 2,\n Doviz = 3,\n YemekKarti = 5,\n KrediKarti = 99,\n}\n\n/**\n * Satışta yer alan ürün bilgisi.\n */\ninterface FiscalItem {\n /** Ürün ID. */\n Id: number;\n /** Miktar. */\n Quantity: number;\n /** Fiyat. */\n Price: number;\n /** Ürün adı. */\n Name: string;\n /** Departman ID. */\n DeptId: number;\n /** Ürün durumu. */\n Status: number;\n /** Ürüne özel indirim. */\n Adj: Adj | null;\n /** Not satırı 1. */\n NoteLine1: string | null;\n /** Not satırı 2. */\n NoteLine2: string | null;\n}\n\n/**\n * İndirim bilgisi.\n */\ninterface Adj {\n /** İndirim tipi. */\n Type: number;\n /** İndirim tutarı. */\n Amount: number;\n /** İndirim yüzdesi. */\n percentage: number;\n /** Not satırı 1. */\n NoteLine1: string | null;\n /** Not satırı 2. */\n NoteLine2: string | null;\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -8,7 +8,10 @@ export declare class CapacitorHuginGMP3Web extends WebPlugin implements Capacito
|
|
|
8
8
|
result: boolean;
|
|
9
9
|
message?: string;
|
|
10
10
|
}>;
|
|
11
|
-
GetVatRates(): Promise<
|
|
11
|
+
GetVatRates(): Promise<{
|
|
12
|
+
result: boolean;
|
|
13
|
+
vatRates: string[];
|
|
14
|
+
}>;
|
|
12
15
|
GetDepartments(): Promise<Department[]>;
|
|
13
16
|
SetDepartment(Department: Department): Promise<{
|
|
14
17
|
result: boolean;
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD,IAAI,CAAC,OAAgC;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,WAAW;QACT,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,cAAc;QACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,aAAa,CAAC,UAAsB;QAClC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,UAAU,CAAC,OAAgB;QACzB,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,YAAY,CAAC,IAAW;QACtB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,YAAY;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,CAAC,OAAuB;QAC7B,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,iBAAiB;QACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ConnectOptions, CapacitorHuginGMP3Plugin, Department, VatRate, SaleItem } from './definitions';\n\nexport class CapacitorHuginGMP3Web extends WebPlugin implements CapacitorHuginGMP3Plugin {\n Sale(options: { saleItem: SaleItem; }): Promise<{ orderNo?: number, result: boolean, message?: string; }> {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates(): Promise<string[]> {\n throw new Error('Method not implemented.');\n }\n GetDepartments(): Promise<Department[]> {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department: Department): Promise<{ result: boolean; }> {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate: VatRate): Promise<{ result: boolean; }> {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type:number): Promise<{ result: boolean, message: string }> {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport(): Promise<{ result: boolean }> {\n throw new Error('Method not implemented.');\n }\n Connect(options: ConnectOptions): Promise<{ connected: boolean }> {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion(): Promise<{ version: string }> {\n throw new Error('Method not implemented.');\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD,IAAI,CAAC,OAAgC;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,WAAW;QACT,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,cAAc;QACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,aAAa,CAAC,UAAsB;QAClC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,UAAU,CAAC,OAAgB;QACzB,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,YAAY,CAAC,IAAW;QACtB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,YAAY;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,CAAC,OAAuB;QAC7B,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,iBAAiB;QACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ConnectOptions, CapacitorHuginGMP3Plugin, Department, VatRate, SaleItem } from './definitions';\n\nexport class CapacitorHuginGMP3Web extends WebPlugin implements CapacitorHuginGMP3Plugin {\n Sale(options: { saleItem: SaleItem; }): Promise<{ orderNo?: number, result: boolean, message?: string; }> {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates(): Promise<{result: boolean, vatRates: string[]}> {\n throw new Error('Method not implemented.');\n }\n GetDepartments(): Promise<Department[]> {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department: Department): Promise<{ result: boolean; }> {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate: VatRate): Promise<{ result: boolean; }> {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type:number): Promise<{ result: boolean, message: string }> {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport(): Promise<{ result: boolean }> {\n throw new Error('Method not implemented.');\n }\n Connect(options: ConnectOptions): Promise<{ connected: boolean }> {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion(): Promise<{ version: string }> {\n throw new Error('Method not implemented.');\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@capacitor/core');
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Satış bilgisi.
|
|
7
|
+
*/
|
|
8
|
+
class SaleItem {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.FiscalItems = [];
|
|
11
|
+
this.Adjustments = [];
|
|
12
|
+
this.Payments = [];
|
|
13
|
+
this.FooterNotes = [];
|
|
14
|
+
this.EndOfReceiptInfo = new EndOfReceiptInfo();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Fiş kapanış bilgileri.
|
|
19
|
+
*/
|
|
20
|
+
class EndOfReceiptInfo {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.CloseReceiptFlag = false;
|
|
23
|
+
this.Barcode = '';
|
|
24
|
+
this.BarcodeFlag = false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Ödeme tipleri. Özel Modeldir. Ödemelerde kredi kartı önceliklidir.
|
|
29
|
+
*/
|
|
30
|
+
exports.PaymentType = void 0;
|
|
31
|
+
(function (PaymentType) {
|
|
32
|
+
PaymentType[PaymentType["Nakit"] = 0] = "Nakit";
|
|
33
|
+
PaymentType[PaymentType["Kredi"] = 1] = "Kredi";
|
|
34
|
+
PaymentType[PaymentType["Cek"] = 2] = "Cek";
|
|
35
|
+
PaymentType[PaymentType["Doviz"] = 3] = "Doviz";
|
|
36
|
+
PaymentType[PaymentType["YemekKarti"] = 5] = "YemekKarti";
|
|
37
|
+
PaymentType[PaymentType["KrediKarti"] = 99] = "KrediKarti";
|
|
38
|
+
})(exports.PaymentType || (exports.PaymentType = {}));
|
|
39
|
+
|
|
5
40
|
const CapacitorHuginGMP3 = core.registerPlugin('CapacitorHuginGMP3', {
|
|
6
41
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorHuginGMP3Web()),
|
|
7
42
|
});
|
|
@@ -47,4 +82,6 @@ var web = /*#__PURE__*/Object.freeze({
|
|
|
47
82
|
});
|
|
48
83
|
|
|
49
84
|
exports.CapacitorHuginGMP3 = CapacitorHuginGMP3;
|
|
85
|
+
exports.EndOfReceiptInfo = EndOfReceiptInfo;
|
|
86
|
+
exports.SaleItem = SaleItem;
|
|
50
87
|
//# sourceMappingURL=plugin.cjs.js.map
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorHuginGMP3 = registerPlugin('CapacitorHuginGMP3', {\n web: () => import('./web').then((m) => new m.CapacitorHuginGMP3Web()),\n});\nexport * from './definitions';\nexport { CapacitorHuginGMP3 };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorHuginGMP3Web extends WebPlugin {\n Sale(options) {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates() {\n throw new Error('Method not implemented.');\n }\n GetDepartments() {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department) {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate) {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type) {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport() {\n throw new Error('Method not implemented.');\n }\n Connect(options) {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Satış bilgisi.\n */\nexport class SaleItem {\n constructor() {\n this.FiscalItems = [];\n this.Adjustments = [];\n this.Payments = [];\n this.FooterNotes = [];\n this.EndOfReceiptInfo = new EndOfReceiptInfo();\n }\n}\n/**\n * Fiş kapanış bilgileri.\n */\nexport class EndOfReceiptInfo {\n constructor() {\n this.CloseReceiptFlag = false;\n this.Barcode = '';\n this.BarcodeFlag = false;\n }\n}\n/**\n * Ödeme tipleri. Özel Modeldir. Ödemelerde kredi kartı önceliklidir.\n */\nexport var PaymentType;\n(function (PaymentType) {\n PaymentType[PaymentType[\"Nakit\"] = 0] = \"Nakit\";\n PaymentType[PaymentType[\"Kredi\"] = 1] = \"Kredi\";\n PaymentType[PaymentType[\"Cek\"] = 2] = \"Cek\";\n PaymentType[PaymentType[\"Doviz\"] = 3] = \"Doviz\";\n PaymentType[PaymentType[\"YemekKarti\"] = 5] = \"YemekKarti\";\n PaymentType[PaymentType[\"KrediKarti\"] = 99] = \"KrediKarti\";\n})(PaymentType || (PaymentType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst CapacitorHuginGMP3 = registerPlugin('CapacitorHuginGMP3', {\n web: () => import('./web').then((m) => new m.CapacitorHuginGMP3Web()),\n});\nexport * from './definitions';\nexport { CapacitorHuginGMP3 };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorHuginGMP3Web extends WebPlugin {\n Sale(options) {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates() {\n throw new Error('Method not implemented.');\n }\n GetDepartments() {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department) {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate) {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type) {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport() {\n throw new Error('Method not implemented.');\n }\n Connect(options) {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["PaymentType","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACO,MAAM,QAAQ,CAAC;AACtB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,QAAQ,IAAI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7
|
+
class SaleItem {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.FiscalItems = [];
|
|
10
|
+
this.Adjustments = [];
|
|
11
|
+
this.Payments = [];
|
|
12
|
+
this.FooterNotes = [];
|
|
13
|
+
this.EndOfReceiptInfo = new EndOfReceiptInfo();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Fiş kapanış bilgileri.
|
|
18
|
+
*/
|
|
19
|
+
class EndOfReceiptInfo {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.CloseReceiptFlag = false;
|
|
22
|
+
this.Barcode = '';
|
|
23
|
+
this.BarcodeFlag = false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Ödeme tipleri. Özel Modeldir. Ödemelerde kredi kartı önceliklidir.
|
|
28
|
+
*/
|
|
29
|
+
exports.PaymentType = void 0;
|
|
30
|
+
(function (PaymentType) {
|
|
31
|
+
PaymentType[PaymentType["Nakit"] = 0] = "Nakit";
|
|
32
|
+
PaymentType[PaymentType["Kredi"] = 1] = "Kredi";
|
|
33
|
+
PaymentType[PaymentType["Cek"] = 2] = "Cek";
|
|
34
|
+
PaymentType[PaymentType["Doviz"] = 3] = "Doviz";
|
|
35
|
+
PaymentType[PaymentType["YemekKarti"] = 5] = "YemekKarti";
|
|
36
|
+
PaymentType[PaymentType["KrediKarti"] = 99] = "KrediKarti";
|
|
37
|
+
})(exports.PaymentType || (exports.PaymentType = {}));
|
|
38
|
+
|
|
4
39
|
const CapacitorHuginGMP3 = core.registerPlugin('CapacitorHuginGMP3', {
|
|
5
40
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorHuginGMP3Web()),
|
|
6
41
|
});
|
|
@@ -46,6 +81,8 @@ var capacitorCapacitorHuginGMP3 = (function (exports, core) {
|
|
|
46
81
|
});
|
|
47
82
|
|
|
48
83
|
exports.CapacitorHuginGMP3 = CapacitorHuginGMP3;
|
|
84
|
+
exports.EndOfReceiptInfo = EndOfReceiptInfo;
|
|
85
|
+
exports.SaleItem = SaleItem;
|
|
49
86
|
|
|
50
87
|
return exports;
|
|
51
88
|
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorHuginGMP3 = registerPlugin('CapacitorHuginGMP3', {\n web: () => import('./web').then((m) => new m.CapacitorHuginGMP3Web()),\n});\nexport * from './definitions';\nexport { CapacitorHuginGMP3 };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorHuginGMP3Web extends WebPlugin {\n Sale(options) {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates() {\n throw new Error('Method not implemented.');\n }\n GetDepartments() {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department) {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate) {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type) {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport() {\n throw new Error('Method not implemented.');\n }\n Connect(options) {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Satış bilgisi.\n */\nexport class SaleItem {\n constructor() {\n this.FiscalItems = [];\n this.Adjustments = [];\n this.Payments = [];\n this.FooterNotes = [];\n this.EndOfReceiptInfo = new EndOfReceiptInfo();\n }\n}\n/**\n * Fiş kapanış bilgileri.\n */\nexport class EndOfReceiptInfo {\n constructor() {\n this.CloseReceiptFlag = false;\n this.Barcode = '';\n this.BarcodeFlag = false;\n }\n}\n/**\n * Ödeme tipleri. Özel Modeldir. Ödemelerde kredi kartı önceliklidir.\n */\nexport var PaymentType;\n(function (PaymentType) {\n PaymentType[PaymentType[\"Nakit\"] = 0] = \"Nakit\";\n PaymentType[PaymentType[\"Kredi\"] = 1] = \"Kredi\";\n PaymentType[PaymentType[\"Cek\"] = 2] = \"Cek\";\n PaymentType[PaymentType[\"Doviz\"] = 3] = \"Doviz\";\n PaymentType[PaymentType[\"YemekKarti\"] = 5] = \"YemekKarti\";\n PaymentType[PaymentType[\"KrediKarti\"] = 99] = \"KrediKarti\";\n})(PaymentType || (PaymentType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst CapacitorHuginGMP3 = registerPlugin('CapacitorHuginGMP3', {\n web: () => import('./web').then((m) => new m.CapacitorHuginGMP3Web()),\n});\nexport * from './definitions';\nexport { CapacitorHuginGMP3 };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorHuginGMP3Web extends WebPlugin {\n Sale(options) {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates() {\n throw new Error('Method not implemented.');\n }\n GetDepartments() {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department) {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate) {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type) {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport() {\n throw new Error('Method not implemented.');\n }\n Connect(options) {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["PaymentType","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACO,MAAM,QAAQ,CAAC;IACtB,IAAI,WAAW,GAAG;IAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;IAC7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