Exemplo n.º 1
0
class PurchaseInvoiceReadDetailSerializer(ModelSerializer):
    material = MaterialNameSerializer(read_only=True)

    class Meta:
        model = PurchaseInvoiceDetail
        fields = [
            'id', 'material', 'rate', 'quantity', 'discount_per',
            'discount_amount', 'igst', 'cgst', 'sgst', 'total_gst',
            'material_value', 'material_amount_pay'
        ]
Exemplo n.º 2
0
class CompanyProjectDetailsReadSerializer(ModelSerializer):
    material = MaterialNameSerializer(read_only=True)
    materialtype = MaterialTypeSerializer(read_only=True)

    class Meta:
        model = CompanyProjectDetail
        fields = [
            'id', 'project', 'materialtype', 'material', 'quantity', 'boq_ref',
            'rate', 'avail_qty'
        ]
Exemplo n.º 3
0
class GRNDetailReadSerializer(ModelSerializer):
    material = MaterialNameSerializer(read_only=True)
    company_project = CompanyProjectSerializer(read_only=True)

    class Meta:
        model = GRNDetail
        fields = [
            'id', 'material', 'material_uom', 'order_quantity',
            'receive_quantity', 'company_project', 'material_uom'
        ]
Exemplo n.º 4
0
class PurchaseDetailReadForGRNSerializer(ModelSerializer):
    material = MaterialNameSerializer(read_only=True)

    class Meta:
        model = PurchaseOrderDetail
        fields = [
            'id', 'material', 'uom', 'requisition_quantity', 'order_quantity',
            'rate', 'material_value', 'discount_percent', 'discount_value',
            'igst', 'cgst', 'sgst', 'gst_amount', 'sub_total', 'delivery_date',
            'avail_qty'
        ]
Exemplo n.º 5
0
class GRNDetailReadSerializer(ModelSerializer):
    material = MaterialNameSerializer(read_only=True)
    company_branch = CompanyBranchSerializer(read_only=True)
    storage_location = CompanyStorageSerializer(read_only=True)
    storage_bin = CompanyStorageBinSerializer(read_only=True)
    uom = UOMSerializer(read_only=True)

    class Meta:
        model = GRNDetail
        fields = [
            'id', 'material', 'uom', 'order_quantity', 'receive_quantity',
            'company_branch', 'storage_location', 'storage_bin'
        ]
Exemplo n.º 6
0
class RequisitionDetailReadForPreviuosPurchaseSerializer(ModelSerializer):

    #created_by = serializers.HiddenField(default=serializers.CurrentUserDefault())
    status = serializers.BooleanField(default=True)
    material = MaterialNameSerializer(read_only=True)
    uom = UOMSerializer(read_only=True)

    class Meta:
        model = RequisitionDetail
        fields = [
            'id', 'material', 'quantity', 'uom', 'status', 'material_rate',
            'project_material_quantity'
        ]
Exemplo n.º 7
0
class PurchaseDetailReadForGRNSerializer(ModelSerializer):
    # company_branch=CompanyBranchSerializer(read_only=True)
    # storage_location=CompanyStorageSerializer(read_only=True)
    # storage_bin=CompanyStorageBinSerializer(read_only=True)
    material = MaterialNameSerializer(read_only=True)

    class Meta:
        model = PurchaseOrderDetail
        fields = [
            'id', 'company_branch', 'storage_location', 'storage_bin',
            'material', 'uom', 'requisition_quantity', 'order_quantity',
            'rate', 'material_value', 'discount_percent', 'discount_value',
            'igst', 'cgst', 'sgst', 'gst_amount', 'sub_total', 'delivery_date'
        ]
Exemplo n.º 8
0
class StockReadSerializer(ModelSerializer):
    grn = GRNSerializer(read_only=True)
    company = CompanyListSerializer(read_only=True)
    company_project = CompanyProjectSerializer(read_only=True)
    material_type = MaterialTypeSerializer(read_only=True)
    material = MaterialNameSerializer(read_only=True)
    status = serializers.BooleanField(default=True)

    class Meta:
        model = Stock
        fields = [
            'id', 'grn', 'company', 'company_project', 'material_type',
            'material', 'rate', 'quantity', 'created_at', 'status',
            'is_deleted', 'grn_number', 'material_uom'
        ]
Exemplo n.º 9
0
class RequisitionDetailReadSerializer(ModelSerializer):

    #created_by = serializers.HiddenField(default=serializers.CurrentUserDefault())
    status = serializers.BooleanField(default=True)
    material = MaterialNameSerializer(read_only=True)
    uom = UOMSerializer(read_only=True)
    branch = CompanyBranchSerializer(read_only=True)
    storage_location = CompanyStorageSerializer(read_only=True)
    storage_bin = CompanyStorageBinSerializer(read_only=True)

    class Meta:
        model = RequisitionDetail
        fields = [
            'id', 'material', 'quantity', 'uom', 'branch', 'storage_location',
            'storage_bin', 'status'
        ]
Exemplo n.º 10
0
class StockReadSerializer(ModelSerializer):

    #created_by = serializers.HiddenField(default=serializers.CurrentUserDefault())
    company = CompanyListSerializer()
    branch = CompanyBranchSerializer(read_only=True)
    storage_location = CompanyStorageSerializer(read_only=True)
    storage_bin = CompanyStorageBinSerializer(read_only=True)
    material = MaterialNameSerializer(read_only=True)
    status = serializers.BooleanField(default=True)

    class Meta:
        model = Stock
        fields = [
            'id', 'grn_id', 'company', 'branch', 'storage_location',
            'storage_bin', 'material', 'rate', 'quantity', 'created_at',
            'created_by_id', 'status'
        ]