capacitor-hugin-gmp3 0.2.3 → 0.2.5

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 CHANGED
@@ -30,6 +30,7 @@ npx cap sync
30
30
  * [`GetDepartments()`](#getdepartments)
31
31
  * [`SetDepartment(...)`](#setdepartment)
32
32
  * [`SetVatRate(...)`](#setvatrate)
33
+ * [`SetVatRates(...)`](#setvatrates)
33
34
  * [Interfaces](#interfaces)
34
35
 
35
36
  </docgen-index>
@@ -176,6 +177,23 @@ Belirli bir KDV oranını ayarlar.
176
177
  --------------------
177
178
 
178
179
 
180
+ ### SetVatRates(...)
181
+
182
+ ```typescript
183
+ SetVatRates(vatRates: { vatRates: VatRate[]; }) => Promise<{ result: boolean; }>
184
+ ```
185
+
186
+ Belirli bir KDV oranını ayarlar.
187
+
188
+ | Param | Type |
189
+ | -------------- | ------------------------------------- |
190
+ | **`vatRates`** | <code>{ vatRates: VatRate[]; }</code> |
191
+
192
+ **Returns:** <code>Promise&lt;{ result: boolean; }&gt;</code>
193
+
194
+ --------------------
195
+
196
+
179
197
  ### Interfaces
180
198
 
181
199
 
@@ -20,6 +20,9 @@ import com.getcapacitor.annotation.CapacitorPlugin;
20
20
  import com.kerzz.hugin.gmp3.IPrinterService;
21
21
 
22
22
 
23
+ import org.json.JSONObject;
24
+
25
+ import java.math.BigDecimal;
23
26
  import java.time.LocalDateTime;
24
27
 
25
28
  import gmp3.droid.printer.Utility;
@@ -335,4 +338,94 @@ public class CapacitorHuginGMP3Plugin extends Plugin {
335
338
  }
336
339
  }
337
340
 
341
+ @PluginMethod
342
+ public void SetVatRates(PluginCall call) {
343
+
344
+ // --- Parametreleri Al ---
345
+ JSArray ratesArray = call.getArray("vatRates");
346
+
347
+ if (ratesArray == null) {
348
+ call.reject("Parametre olarak 'vatRates' array gönderilmelidir.");
349
+ return;
350
+ }
351
+
352
+ try {
353
+ for (int i = 0; i <= 7; i++) {
354
+ printerService.SetVATRate(i, -1);
355
+ }
356
+ // Makbuzu iptal et
357
+ printerService.VoidReceipt();
358
+
359
+ // Sonuçları tutmak için liste
360
+ JSArray results = new JSArray();
361
+
362
+ for (int i = 0; i < ratesArray.length(); i++) {
363
+ JSONObject item = ratesArray.getJSONObject(i);
364
+
365
+ // Tek tek index ve vatRate al
366
+ Integer indexValue = item.getInt("index");
367
+ Double vatRateValue = item.getDouble("vatRate");
368
+
369
+ // --- Null Kontrol ---
370
+ if (indexValue == null || vatRateValue == null) {
371
+
372
+ JSObject errorObj = JSObjectHelper.result(false,
373
+ "Satır " + i + ": index ve vatRate zorunludur.");
374
+ results.put(errorObj);
375
+ continue;
376
+ }
377
+
378
+ int index = indexValue;
379
+ double vatRate = vatRateValue;
380
+
381
+ // --- Validasyon ---
382
+ if (index < 0 || index > 8) {
383
+ JSObject errorObj = JSObjectHelper.result(false,
384
+ "Satır " + i + ": index 0 ile 8 arasında olmalıdır.");
385
+ results.put(errorObj);
386
+ continue;
387
+ }
388
+
389
+ if (vatRate < -1 || vatRate > 100) {
390
+ JSObject errorObj = JSObjectHelper.result(false,
391
+ "Satır " + i + ": vatRate 0 ile 100 arasında olmalıdır.");
392
+ results.put(errorObj);
393
+ continue;
394
+ }
395
+
396
+ // --- KDV Set Et ---
397
+ try {
398
+ String response = printerService.SetVATRate(index, vatRate);
399
+ String[] parts = PrinterCoverService.printResponse(response);
400
+ int errorCode = Integer.parseInt(parts[0]);
401
+
402
+ if (errorCode != 0) {
403
+ String msg = "Satır " + i + ": KDV set edilemedi. Kod: " +
404
+ errorCode + " - " + Utility.GetErrorMessage(errorCode);
405
+
406
+ results.put(JSObjectHelper.result(false, msg));
407
+
408
+ } else {
409
+ results.put(JSObjectHelper.result(true,
410
+ "Satır " + i + ": KDV başarıyla ayarlandı."));
411
+ }
412
+
413
+ } catch (Exception ex) {
414
+ results.put(JSObjectHelper.result(false,
415
+ "Satır " + i + ": SetVATRate işleminde hata: " + ex.getMessage()));
416
+ }
417
+ }
418
+
419
+ // Sonuçları döndür
420
+ JSObject resultObj = new JSObject();
421
+ resultObj.put("results", results);
422
+
423
+ call.resolve(resultObj);
424
+
425
+ } catch (Exception e) {
426
+ call.reject("SetVatRates işleminde genel hata oluştu.", e);
427
+ }
428
+ }
429
+
430
+
338
431
  }
package/dist/docs.json CHANGED
@@ -159,6 +159,29 @@
159
159
  "VatRate"
160
160
  ],
161
161
  "slug": "setvatrate"
162
+ },
163
+ {
164
+ "name": "SetVatRates",
165
+ "signature": "(vatRates: { vatRates: VatRate[]; }) => Promise<{ result: boolean; }>",
166
+ "parameters": [
167
+ {
168
+ "name": "vatRates",
169
+ "docs": "",
170
+ "type": "{ vatRates: VatRate[]; }"
171
+ }
172
+ ],
173
+ "returns": "Promise<{ result: boolean; }>",
174
+ "tags": [
175
+ {
176
+ "name": "param",
177
+ "text": "vatRate KDV oran bilgisi."
178
+ }
179
+ ],
180
+ "docs": "Belirli bir KDV oranını ayarlar.",
181
+ "complexTypes": [
182
+ "VatRate"
183
+ ],
184
+ "slug": "setvatrates"
162
185
  }
163
186
  ],
164
187
  "properties": []
@@ -65,6 +65,15 @@ export interface CapacitorHuginGMP3Plugin {
65
65
  SetVatRate(vatRate: VatRate): Promise<{
66
66
  result: boolean;
67
67
  }>;
68
+ /**
69
+ * Belirli bir KDV oranını ayarlar.
70
+ * @param vatRate KDV oran bilgisi.
71
+ */
72
+ SetVatRates(vatRates: {
73
+ vatRates: VatRate[];
74
+ }): Promise<{
75
+ result: boolean;
76
+ }>;
68
77
  }
69
78
  /**
70
79
  * Bağlantı ayarları.
@@ -1 +1 @@
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"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAoGA;;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 * Belirli bir KDV oranını ayarlar.\n * @param vatRate KDV oran bilgisi.\n */\n SetVatRates(vatRates: {vatRates: 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
@@ -19,6 +19,11 @@ export declare class CapacitorHuginGMP3Web extends WebPlugin implements Capacito
19
19
  SetVatRate(vatRate: VatRate): Promise<{
20
20
  result: boolean;
21
21
  }>;
22
+ SetVatRates(vatRate: {
23
+ vatRates: VatRate[];
24
+ }): Promise<{
25
+ result: boolean;
26
+ }>;
22
27
  PrintXReport(type: number): Promise<{
23
28
  result: boolean;
24
29
  message: string;
package/dist/esm/web.js CHANGED
@@ -18,6 +18,10 @@ export class CapacitorHuginGMP3Web extends WebPlugin {
18
18
  console.log('setVatRate', vatRate);
19
19
  throw new Error('Method not implemented.');
20
20
  }
21
+ SetVatRates(vatRate) {
22
+ console.log('setVatRates', vatRate);
23
+ throw new Error('Method not implemented.');
24
+ }
21
25
  PrintXReport(type) {
22
26
  console.log('printXReport', type);
23
27
  throw new Error('Method not implemented.');
@@ -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<{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"]}
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,OAA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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 SetVatRates(vatRate: {vatRates: VatRate[]}): Promise<{ result: boolean; }> {\n console.log('setVatRates', 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}\n"]}
@@ -60,6 +60,10 @@ class CapacitorHuginGMP3Web extends core.WebPlugin {
60
60
  console.log('setVatRate', vatRate);
61
61
  throw new Error('Method not implemented.');
62
62
  }
63
+ SetVatRates(vatRate) {
64
+ console.log('setVatRates', vatRate);
65
+ throw new Error('Method not implemented.');
66
+ }
63
67
  PrintXReport(type) {
64
68
  console.log('printXReport', type);
65
69
  throw new Error('Method not implemented.');
@@ -1 +1 @@
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=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,CAAC;AAClD;AACA;;;;;;;;;;;"}
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 SetVatRates(vatRate) {\n console.log('setVatRates', 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,CAAC,QAAQ,GAAG,EAAE;AAC1B,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,QAAQ,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,EAAE;AACtD;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAgB,CAAC;AAC9B,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,gBAAgB,GAAG,KAAK;AACrC,QAAQ,IAAI,CAAC,OAAO,GAAG,EAAE;AACzB,QAAQ,IAAI,CAAC,WAAW,GAAG,KAAK;AAChC;AACA;AACA;AACA;AACA;AACWA;AACX,CAAC,UAAU,WAAW,EAAE;AACxB,IAAI,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;AACnD,IAAI,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;AACnD,IAAI,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK;AAC/C,IAAI,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;AACnD,IAAI,WAAW,CAAC,WAAW,CAAC,YAAY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,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC;AACzC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,YAAY,GAAG;AACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,OAAO,CAAC,OAAO,EAAE;AACrB,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC;AACvC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,iBAAiB,GAAG;AACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA;;;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -59,6 +59,10 @@ var capacitorCapacitorHuginGMP3 = (function (exports, core) {
59
59
  console.log('setVatRate', vatRate);
60
60
  throw new Error('Method not implemented.');
61
61
  }
62
+ SetVatRates(vatRate) {
63
+ console.log('setVatRates', vatRate);
64
+ throw new Error('Method not implemented.');
65
+ }
62
66
  PrintXReport(type) {
63
67
  console.log('printXReport', type);
64
68
  throw new Error('Method not implemented.');
@@ -1 +1 @@
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;IAC7B,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;IAC7B,QAAQ,IAAI,CAAC,QAAQ,GAAG,EAAE;IAC1B,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;IAC7B,QAAQ,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,E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I,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,cAAc,GAAG;IACrB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,aAAa,CAAC,UAAU,EAAE;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC;IAChD,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,UAAU,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC;IAC1C,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,YAAY,CAAC,IAAI,EAAE;IACvB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC;IACzC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,YAAY,GAAG;IACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,OAAO,CAAC,OAAO,EAAE;IACrB,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC;IACvC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,iBAAiB,GAAG;IACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA;;;;;;;;;;;;;;;;;"}
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 SetVatRates(vatRate) {\n console.log('setVatRates', 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;I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IAAI,iBAAiB,GAAG;IACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-hugin-gmp3",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Hugin plugin for TCP/IP",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",