1
0
forked from erp-dev/erp

feat: red flush and cost

This commit is contained in:
2026-06-22 22:27:28 +08:00
parent 9a1c92febf
commit 70b3a0d246
25 changed files with 1375 additions and 20 deletions

View File

@@ -54,12 +54,14 @@ class PurchaseOrderSerializer(serializers.ModelSerializer):
'total_amount', 'diff_quantity', 'total_quantity',
'operator', 'operator_name', 'warehouse', 'warehouse_name',
'status', 'is_red_flushed', 'red_flush_id', 'red_flushed_at',
'balance_before_snapshot',
'remarks', 'created_at', 'updated_at', 'items', 'quantity_of_rolls',
]
read_only_fields = [
'id', 'created_at', 'updated_at', 'items', 'supplier_name',
'operator_name', 'warehouse_name', 'is_red_flushed',
'red_flush_id', 'red_flushed_at',
'balance_before_snapshot',
]
@@ -142,6 +144,7 @@ class PurchaseOrderView(StockChangeViewMixin, views.APIView):
'id': purchase_order.id,
'human_id': purchase_order.human_id,
'status': purchase_order.status,
'balance_before_snapshot': purchase_order.balance_before_snapshot,
'message': '采购单创建成功,等待审批',
},
status=status.HTTP_201_CREATED,