Fix ordering in items and fix qute to accept value more than remaining value.
This commit is contained in:
parent
8bc2bdef5f
commit
9cadf4eed5
3 changed files with 5 additions and 5 deletions
|
|
@ -36,7 +36,7 @@ def quote_step(request, instance_id, step_id):
|
|||
return redirect('processes:request_list')
|
||||
|
||||
# دریافت آیتمها
|
||||
items = Item.objects.filter(is_active=True, is_special=False, is_deleted=False).order_by('name')
|
||||
items = Item.objects.filter(is_active=True, is_special=False, is_deleted=False).order_by('-is_default_in_quotes')
|
||||
existing_quote = Quote.objects.filter(process_instance=instance).first()
|
||||
existing_quote_items = {}
|
||||
if existing_quote:
|
||||
|
|
@ -556,8 +556,8 @@ def add_quote_payment(request, instance_id, step_id):
|
|||
except InvalidOperation:
|
||||
return JsonResponse({'success': False, 'message': 'مبلغ نامعتبر است'})
|
||||
remaining = quote.get_remaining_amount()
|
||||
if amount_dec > remaining:
|
||||
return JsonResponse({'success': False, 'message': 'مبلغ فیش بیشتر از مانده پیشفاکتور است'})
|
||||
# if amount_dec > remaining:
|
||||
# return JsonResponse({'success': False, 'message': 'مبلغ فیش بیشتر از مانده پیشفاکتور است'})
|
||||
|
||||
Payment.objects.create(
|
||||
invoice=invoice,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue