update excel

This commit is contained in:
2026-02-10 16:37:06 +03:30
parent 2372c412e9
commit be7860f4dd
4 changed files with 35 additions and 2 deletions

View File

@@ -4486,3 +4486,26 @@ def canceled_out_province_request_manual(request):
req = send_sms_request(
f"http://webservice.sahandsms.com/newsmswebservice.asmx/SendPostUrl?username={USERNAME_SMS_FINANCIAL}&password={PASSWORD_SMS_FINANCIAL}&from=30002501&to={UNION_NUMBER}&message={message}")
return HttpResponse('ok')
@api_view(["GET"])
@csrf_exempt
@permission_classes([AllowAny])
def archive_unknown_hatching(request):
hatchings = PoultryHatching.objects.filter(trash=False, unknown=True,left_over__lt=F('quantity') * 0.1)
for hatching in hatchings:
hatching.archive=True
hatching.state='complete'
hatching.allow_hatching='True'
hatching.save()
return Response("done!")
def archive_unknown_hatching_cron():
hatchings = PoultryHatching.objects.filter(trash=False, unknown=True,left_over__lt=F('quantity') * 0.1)
for hatching in hatchings:
hatching.archive=True
hatching.state='complete'
hatching.allow_hatching='True'
hatching.save()