class ReversGRNReadSerializer(ModelSerializer):
    reverse_grn_detail = ReverseGRNDetailReadSerializer(many=True)
    created_by = UserReadSerializer()

    class Meta:
        model = ReversGRN
        fields = [
            'id', 'grn', 'revers_gen_no', 'created_at', 'created_by', 'status',
            'is_approve', 'is_finalised', 'reverse_grn_detail', 'grn_no',
            'company', 'vendor_name', 'vendor_address', 'project',
            'purchase_order_no', 'approval_level'
        ]
示例#2
0
class DepartmentsReadSerializer(ModelSerializer):

    created_by = UserReadSerializer()
    company = CompanyListSerializer()

    status = serializers.BooleanField(default=True)

    class Meta:
        model = Departments
        fields = [
            'id', 'company', 'department_name', 'created_at', 'created_by',
            'status', 'is_deleted'
        ]
class PaymentReadSerializer(ModelSerializer):

    created_by = UserReadSerializer()
    bank = BankSerializer()

    class Meta:
        model = Payment
        fields = [
            'id', 'pur_inv', 'bank', 'payment_mode', 'payment_refrence',
            'total_amount', 'special_note', 'is_approve', 'is_paid', 'status',
            'created_at', 'created_by', 'is_deleted', 'payment_no', 'company',
            'pur_inv_no', 'po_order_no', 'vendor_name', 'project_name'
        ]
class RequisitionReadSerializer(ModelSerializer):

    requisition_detail = RequisitionDetailReadSerializer(many=True)
    company = CompanyListSerializer()
    created_by = UserReadSerializer()
    project = CompanyProjectReadSerializer()

    class Meta:
        model = Requisition
        fields = [
            'id', 'company', 'special_note', 'is_approve', 'is_finalised',
            'status', 'created_at', 'created_by', 'requisition_detail',
            'requisition_no', 'project', 'approval_level'
        ]
示例#5
0
class RequisitionReadSerializer(ModelSerializer):

    requisition_detail = RequisitionDetailReadSerializer(many=True)
    requisition_map = RequisitionMapSerializer(many=True)
    company = CompanyListSerializer()
    purchase_org = PurchaseOrgSerializer()
    purchase_grp = PurchaseGroupSerializer()
    created_by = UserReadSerializer()

    class Meta:
        model = Requisition
        fields = [
            'id', 'company', 'purchase_org', 'purchase_grp', 'special_note',
            'is_approve', 'is_finalised', 'status', 'created_at', 'created_by',
            'requisition_detail', 'requisition_map'
        ]
示例#6
0
class PaymentReadSerializer(ModelSerializer):



    company = CompanyListSerializer()
    vendor = VendorNameSerializer(read_only=True)
    vendor_address = VendorAddressSerializer(read_only=True)
    created_by = UserReadSerializer()
    bank=BankSerializer()
    payment_map=PaymentMapSerializer(read_only=True,many=True)

    class Meta:
        model = Payment
        fields = ['id','company','pur_inv','vendor','vendor_address','purchase_inv_no','purchase_inv_date','po_order','po_order_no','bank','payment_mode',
                  'payment_refrence','total_amount','special_note','is_approve','is_paid','status','created_at',
                  'created_by','payment_map','is_deleted']
示例#7
0
class EmployeeReadSerializer(ModelSerializer):
    created_by = UserReadSerializer()
    status = serializers.BooleanField(default=True)
    company = CompanyListSerializer()
    departments = DepartmentsListSerializer()
    designation = DesignationReadSerializer()

    class Meta:
        model = Employee
        fields = [
            'id', 'company', 'departments', 'designation', 'first_name',
            'last_name', 'email', 'contact', 'dob', 'alt_contact', 'pan',
            'blood_group', 'adhaar_no', 'emp_present_address',
            'emp_present_state', 'emp_present_city', 'emp_present_pin',
            'emp_permanent_address', 'emp_permanent_state',
            'emp_permanent_city', 'emp_permanent_pin', 'created_at',
            'created_by', 'status', 'is_deleted'
        ]
class GRNReadSerializer(ModelSerializer):

    po_order = PurchaseOrderReadForGRNSerializer(read_only=True)
    company = CompanyListSerializer()
    vendor = VendorNameSerializer(read_only=True)
    vendor_address = VendorAddressSerializer()
    grn_detail = GRNDetailReadSerializer(many=True)
    created_by = UserReadSerializer()

    #project = GRNProjectReadSerializer()

    class Meta:
        model = GRN
        fields = [
            'id', 'grn_no', 'po_order', 'company', 'vendor', 'vendor_address',
            'waybill_no', 'vehicle_no', 'check_post', 'challan_no',
            'challan_date', 'is_approve', 'is_finalised', 'status',
            'created_at', 'created_by', 'grn_detail', 'is_deleted',
            'purchase_order_no', 'project', 'approval_level'
        ]
class PurchaseOrderReadSerializer(ModelSerializer):
    company = CompanyListSerializer()
    created_by = UserReadSerializer()
    purchase_order_detail = PurchaseDetailReadSerializer(many=True)
    purchase_order_freight = PurchaseFreightSerializer(many=True)
    purchase_order_terms = PurchseTermsReadSerializer(many=True)
    vendor = VendorNameSerializer(read_only=True)
    vendor_address = VendorAddressSerializer(read_only=True)
    requisition = RequisitionProjectNameSerializer(read_only=True)

    class Meta:
        model = PurchaseOrder
        fields = [
            'id', 'quotation_no', 'quotation_date', 'company', 'vendor',
            'vendor_address', 'grand_total', 'grand_total_words', 'is_approve',
            'is_finalised', 'status', 'created_at', 'created_by',
            'purchase_order_detail', 'purchase_order_freight',
            'purchase_order_terms', 'purchase_order_no', 'requisition',
            'approval_level', 'project'
        ]
示例#10
0
class GRNReadSerializer(ModelSerializer):

    purchase_order_no = PurchaseMapSerializer(read_only=True, many=True)
    po_order = PurchaseOrderReadForGRNSerializer(read_only=True)
    company = CompanyListSerializer()
    pur_org = PurchaseOrgSerializer()
    pur_grp = PurchaseGroupSerializer()
    vendor = VendorNameSerializer(read_only=True)
    vendor_address = VendorAddressSerializer()
    grn_map = GRNMapSerializer(read_only=True, many=True)
    grn_detail = GRNDetailReadSerializer(many=True)
    created_by = UserReadSerializer()

    class Meta:
        model = GRN
        fields = [
            'id', 'purchase_order_no', 'po_order', 'pur_org', 'pur_grp',
            'company', 'vendor', 'vendor_address', 'waybill_no', 'vehicle_no',
            'check_post', 'challan_no', 'challan_date', 'is_approve',
            'is_finalised', 'status', 'created_at', 'created_by', 'is_deleted',
            'grn_detail', 'grn_map'
        ]
示例#11
0
class PurchaseOrderReadSerializer(ModelSerializer):
    requisition_no = RequisitionMapSerializer(many=True)
    company = CompanyListSerializer()
    pur_org = PurchaseOrgSerializer()
    pur_grp = PurchaseGroupSerializer()
    created_by = UserReadSerializer()
    purchase_order_detail = PurchaseDetailReadSerializer(many=True)
    purchase_order_freight = PurchaseFreightSerializer(many=True)
    purchase_order_terms = PurchseTermsReadSerializer(many=True)
    purchase_order_map = PurchaseMapSerializer(many=True)
    vendor = VendorNameSerializer(read_only=True)
    vendor_address = VendorAddressSerializer(read_only=True)

    class Meta:
        model = PurchaseOrder
        fields = [
            'id', 'requisition_no', 'quotation_no', 'quotation_date',
            'pur_org', 'pur_grp', 'company', 'vendor', 'vendor_address',
            'grand_total', 'grand_total_words', 'is_approve', 'is_finalised',
            'status', 'created_at', 'created_by', 'purchase_order_detail',
            'purchase_order_freight', 'purchase_order_terms',
            'purchase_order_map'
        ]
示例#12
0
class GRNCreateBySerializer(ModelSerializer):
    created_by = UserReadSerializer()

    class Meta:
        model = GRN
        fields = ['id', 'created_at', 'created_by']