Exemple #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'
        ]
Exemple #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'
        ]
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'
        ]
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'
        ]
Exemple #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'
        ]
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'
        ]
Exemple #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'
        ]
Exemple #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'
        ]
Exemple #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'
        ]
Exemple #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'
        ]