Fix 'transporter info' section in Delivery Note (#15565)

- create is_transporter checkbox in supplier doctype
- new field transporter (supplier with is_transporter checked)
- created fields driver and driver_name
- removed GST India fields from core doctype
- removed readonly & allow_on_submit from fields (delivery trip applicable only for in-house delivery)
- read_only transporter_name field (kept for backwards compatibility)
- made necessary changes in delivery_trip implementation
- hidden section's fields from print (preserving v10 convention)
- added transporter field to 'Driver' doctype
- added queries for transporter and driver fields
- GST India fields in regional module
- Fix e-waybill report
This commit is contained in:
Sagar Vora
2018-10-10 14:51:26 +05:30
committed by Nabin Hait
parent dd87e0f1e2
commit d92f3ac480
10 changed files with 6225 additions and 6115 deletions

View File

@@ -164,6 +164,43 @@ def make_custom_fields(update=True):
fieldtype='Check', insert_after='disabled', print_hide=1)
]
ewaybill_fields = [
{
'fieldname': 'distance',
'label': 'Distance (in km)',
'fieldtype': 'Float',
'insert_after': 'vehicle_no',
'print_hide': 1
},
{
'fieldname': 'gst_transporter_id',
'label': 'GST Transporter ID',
'fieldtype': 'Data',
'insert_after': 'transporter_name',
'fetch_from': 'transporter.gst_transporter_id',
'print_hide': 1
},
{
'fieldname': 'mode_of_transport',
'label': 'Mode of Transport',
'fieldtype': 'Select',
'options': '\nRoad\nAir\nRail\nShip',
'default': 'Road',
'insert_after': 'lr_date',
'print_hide': 1
},
{
'fieldname': 'gst_vehicle_type',
'label': 'GST Vehicle Type',
'fieldtype': 'Select',
'options': '\nRegular\nOver Dimensional Cargo (ODC)',
'default': 'Regular',
'depends_on': 'eval:(doc.mode_of_transport === "Road")',
'insert_after': 'mode_of_transport',
'print_hide': 1
}
]
custom_fields = {
'Address': [
dict(fieldname='gstin', label='Party GSTIN', fieldtype='Data',
@@ -175,7 +212,7 @@ def make_custom_fields(update=True):
],
'Purchase Invoice': invoice_gst_fields + purchase_invoice_gst_fields,
'Sales Invoice': invoice_gst_fields + sales_invoice_gst_fields,
'Delivery Note': sales_invoice_gst_fields,
'Delivery Note': sales_invoice_gst_fields + ewaybill_fields,
'Sales Taxes and Charges Template': inter_state_gst_field,
'Purchase Taxes and Charges Template': inter_state_gst_field,
'Item': [
@@ -240,6 +277,15 @@ def make_custom_fields(update=True):
fieldtype='Currency', insert_after='monthly_house_rent', read_only=1),
dict(fieldname='total_eligible_hra_exemption', label='Total Eligible HRA Exemption',
fieldtype='Currency', insert_after='monthly_hra_exemption', read_only=1)
],
'Supplier': [
{
'fieldname': 'gst_transporter_id',
'label': 'GST Transporter ID',
'fieldtype': 'Data',
'insert_after': 'supplier_type',
'depends_on': 'eval:doc.is_transporter'
}
]
}