fix bug of transaction, when is success do not manage inventory again
This commit is contained in:
@@ -130,6 +130,12 @@ class POSDeviceViewSet(viewsets.ModelViewSet, POSDeviceMixin):
|
||||
"serial": device.serial,
|
||||
"provider": organization.name,
|
||||
"provider_tell": organization.phone,
|
||||
"main_company": {
|
||||
"name": main_company.name,
|
||||
"phone": main_company.phone,
|
||||
"shaba": main_company.bank_information.all().first().sheba, # noqa
|
||||
"amount": 400
|
||||
}
|
||||
}, status=status.HTTP_401_UNAUTHORIZED)
|
||||
|
||||
else:
|
||||
@@ -147,6 +153,12 @@ class POSDeviceViewSet(viewsets.ModelViewSet, POSDeviceMixin):
|
||||
"password": "****",
|
||||
"provider": organization.name,
|
||||
"provider_tell": organization.phone,
|
||||
"main_company": {
|
||||
"name": main_company.name,
|
||||
"phone": main_company.phone,
|
||||
"shaba": main_company.bank_information.all().first().sheba, # noqa
|
||||
"amount": 400
|
||||
}
|
||||
}, status=status.HTTP_412_PRECONDITION_FAILED)
|
||||
|
||||
@action(
|
||||
|
||||
Reference in New Issue
Block a user