fix - transaction search
This commit is contained in:
@@ -140,8 +140,8 @@ class RancherViewSet(viewsets.ModelViewSet, DynamicSearchMixin):
|
|||||||
|
|
||||||
rancher = self.queryset.filter(national_code=request.data['national_code'])
|
rancher = self.queryset.filter(national_code=request.data['national_code'])
|
||||||
|
|
||||||
# if len(rancher) > 1:
|
if len(rancher) > 1:
|
||||||
# raise DuplicateRancherException()
|
raise DuplicateRancherException()
|
||||||
|
|
||||||
if rancher.exists():
|
if rancher.exists():
|
||||||
serializer = self.serializer_class(rancher.first())
|
serializer = self.serializer_class(rancher.first())
|
||||||
|
|||||||
@@ -135,8 +135,7 @@ class InventoryQuotaSaleTransactionViewSet(BaseViewSet, SoftDeleteMixin, Dynamic
|
|||||||
search_fields = [
|
search_fields = [
|
||||||
'rancher_fullname', 'rancher_mobile', 'pos_device__device_identity',
|
'rancher_fullname', 'rancher_mobile', 'pos_device__device_identity',
|
||||||
'pos_device__acceptor', 'pos_device__terminal', 'pos_device__serial',
|
'pos_device__acceptor', 'pos_device__terminal', 'pos_device__serial',
|
||||||
'items__gov_product__name', 'items__free_product__name', 'items__name',
|
'transaction_id', 'seller_organization__name',
|
||||||
'items__item_type', 'items__unit', 'transaction_id', 'seller_organization__name',
|
|
||||||
'quota_distribution__distribution_id', 'weight', 'delivery_address', 'transaction_price',
|
'quota_distribution__distribution_id', 'weight', 'delivery_address', 'transaction_price',
|
||||||
'price_paid', 'price_type', 'product_type', 'transactions_number', 'transaction_status',
|
'price_paid', 'price_type', 'product_type', 'transactions_number', 'transaction_status',
|
||||||
'transaction_status_code', 'ref_num', 'terminal', 'payer_cart', 'transaction_date',
|
'transaction_status_code', 'ref_num', 'terminal', 'payer_cart', 'transaction_date',
|
||||||
|
|||||||
Reference in New Issue
Block a user