diff --git a/src/main/java/ru/evotor/framework/core/action/datamapper/ReceiptHeaderMapper.java b/src/main/java/ru/evotor/framework/core/action/datamapper/ReceiptHeaderMapper.java index 5f171ff9b..1c8f5d5d2 100644 --- a/src/main/java/ru/evotor/framework/core/action/datamapper/ReceiptHeaderMapper.java +++ b/src/main/java/ru/evotor/framework/core/action/datamapper/ReceiptHeaderMapper.java @@ -13,6 +13,7 @@ public final class ReceiptHeaderMapper { private static final String KEY_RECEIPT_UUID = "receiptUuid"; private static final String KEY_BASE_RECEIPT_UUID = "baseReceiptUuid"; + private static final String KEY_USER_UUID = "userUuid"; private static final String KEY_RECEIPT_NUMBER = "receiptNumber"; private static final String KEY_RECEIPT_TYPE = "receiptType"; private static final String KEY_RECEIPT_DATE = "receiptDate"; @@ -41,6 +42,7 @@ public static Receipt.Header from(@Nullable Bundle bundle) { return new Receipt.Header( receiptUuid, baseReceiptUuid, + bundle.getString(KEY_USER_UUID), receiptNumber, Utils.safeValueOf(Receipt.Type.class, receiptType, null), date, @@ -58,6 +60,7 @@ public static Bundle toBundle(@Nullable Receipt.Header header) { Bundle bundle = new Bundle(); bundle.putString(KEY_RECEIPT_UUID, header.getUuid()); bundle.putString(KEY_BASE_RECEIPT_UUID, header.getBaseReceiptUuid()); + bundle.putString(KEY_USER_UUID, header.getUserUuid()); bundle.putString(KEY_RECEIPT_NUMBER, header.getNumber()); bundle.putString(KEY_RECEIPT_TYPE, header.getType().name()); diff --git a/src/main/java/ru/evotor/framework/receipt/Receipt.kt b/src/main/java/ru/evotor/framework/receipt/Receipt.kt index b57c0b25e..fafd5d068 100644 --- a/src/main/java/ru/evotor/framework/receipt/Receipt.kt +++ b/src/main/java/ru/evotor/framework/receipt/Receipt.kt @@ -60,6 +60,10 @@ data class Receipt * Uuid чека-основания */ val baseReceiptUuid: String?, + /** + * Uuid кассира + */ + val userUuid: String?, /** * Номер чека. Может быть null для еще незакрытого чека */ @@ -166,4 +170,4 @@ data class Receipt }) } } -} \ No newline at end of file +} diff --git a/src/main/java/ru/evotor/framework/receipt/ReceiptApi.kt b/src/main/java/ru/evotor/framework/receipt/ReceiptApi.kt index d5fd7ac2b..93c60ff6f 100644 --- a/src/main/java/ru/evotor/framework/receipt/ReceiptApi.kt +++ b/src/main/java/ru/evotor/framework/receipt/ReceiptApi.kt @@ -538,6 +538,7 @@ object ReceiptApi { return Receipt.Header( uuid = cursor.getString(cursor.getColumnIndex(ReceiptHeaderTable.COLUMN_UUID)), baseReceiptUuid = cursor.optString(ReceiptHeaderTable.COLUMN_BASE_RECEIPT_UUID), + userUuid = cursor.optString(ReceiptHeaderTable.COLUMN_USER_UUID), number = cursor.optString(ReceiptHeaderTable.COLUMN_NUMBER), type = Utils.safeValueOf(Receipt.Type::class.java, cursor.getString(cursor.getColumnIndex(ReceiptHeaderTable.COLUMN_TYPE)), null) ?: return null, diff --git a/src/main/java/ru/evotor/framework/receipt/ReceiptHeaderTable.kt b/src/main/java/ru/evotor/framework/receipt/ReceiptHeaderTable.kt index 404222734..b32be5e2c 100644 --- a/src/main/java/ru/evotor/framework/receipt/ReceiptHeaderTable.kt +++ b/src/main/java/ru/evotor/framework/receipt/ReceiptHeaderTable.kt @@ -3,6 +3,7 @@ package ru.evotor.framework.receipt object ReceiptHeaderTable { const val COLUMN_UUID = "UUID" const val COLUMN_BASE_RECEIPT_UUID = "BASE_RECEIPT_UUID" + const val COLUMN_USER_UUID = "USER_UUID" const val COLUMN_NUMBER = "NUMBER" const val COLUMN_TYPE = "TYPE" const val COLUMN_DATE = "DATE"