Commit fe8ad907 authored by SABURI PATEKAR's avatar SABURI PATEKAR

Implemented a new screen for the Sales Quotation Amendment.

parent 3a16852d
{
"application": {
"id": "AMD",
"title": "Sales Quotation Amendment Detail",
"description": "Application for managing and amending sales quotation detail records with a single form interface.",
"icon": "request_quote",
"theme_color": "#1976d2",
"group": "Sales",
"generated": true
},
"navigation": [
{
"id": "SALESQUOTDETAMD.1",
"title": "Sales Quotation Amendment",
"parent_id": "",
"icon_image": "edit_note",
"description": "Single form for viewing and amending sales quotation detail records.",
"obj_name": "sales_quot_amd22",
"obj_type": "T",
"menu_path": "SALESQUOTDETAMD.1",
"functional_specs": "Create a single screen with only 2 groupbox as below: \nIn sequence basic group box should be at first\nIMPORTANT: Create only single form.\n\nTable Name: SALES_QUOTDET_AMD\nGroupBox Name:Basic\nAMD_NO\tCHAR(10)\tNOT NULL\tCK\nITEM_CODE (CHAR(10))\nQUANTITY\tNUMBER(12,3)\tNOT NULL\nQUANTITY_O\tNUMBER(12,3)\tNOT NULL\tThis should be allowed to amendment\nUNIT (CHAR(3))\nRATE (NUMBER(16,4))\nSAMPL_QTY (NUMBER(12,3))\nSCH_DATE (DATE)\nSCH_DATE_UPTO (DATE)\nUNIT__SAMPL (CHAR(3))\nUNIT__RATE_O\tCHAR(3)\t\tThis should be allowed to amendment\nUNIT__RATE (CHAR(3))\nTAX_CLASS (CHAR(5))\nTAX_CHAP (CHAR(10))\nTAX_ENV (CHAR(10))\nTAX_AMT (NUMBER(14,3))\nNET_AMT (NUMBER(14,3))\n\nGroupBox Name:Others\nLINE_NO\tNUMBER(3)\tNOT NULL\tCK\nQUOT_NO (CHAR(10))\nAMD_NO (CHAR(10))\nCR_TERM (CHAR(5))\nDLV_TERM (CHAR(5))\nDLV_AT (VARCHAR2(30))\nPACK_INSTR (VARCHAR2(120))\nPACK_QTY (NUMBER(14,3))\nPACK_CODE (CHAR(5))\nPACKING (VARCHAR2(10))\nITEM_SPEC (VARCHAR2(300))\nREMARKS (VARCHAR2(120))\nNote: stays all the fields are non-editable expect QUANTITY, UNIT__RATE editable"
}
]
}
\ No newline at end of file
{
"application": {
"id": "QAM",
"title": "Sales Quotation Amendment",
"description": "Application to manage quotation amendments, including creation, update, and tracking of amendments with detailed status, terms, and other related information.",
"icon": "edit_document",
"theme_color": "#1976d2",
"group": "Sales",
"generated": true
},
"navigation": [
{
"id": "Draft_Application.1",
"title": "Quotation Amendment",
"parent_id": "",
"icon_image": "edit_note",
"description": "Manage all activities related to quotation amendments.",
"obj_name": "QAMD_quotation_amendment",
"obj_type": "-",
"menu_path": "Draft_Application.1",
"functional_specs": "Parent navigation for all quotation amendment related activities."
},
{
"id": "Draft_Application.1.1",
"title": "Sales Quotation Amendment",
"parent_id": "Draft_Application.1",
"icon_image": "manage_accounts",
"description": "Create, view, edit, and manage quotation amendments.",
"obj_name": "sales_quot_amd21",
"obj_type": "T",
"menu_path": "Draft_Application.1.1",
"functional_specs": "Create 1 forms for the Quotation Amendment screen with the following specifications:\nCreate a Quotation Amendment screen 1st Form with 4 Group Boxes:Basic, Status, Terms, and Others.\nTable Name: SALES_QUOT_AMD\nGroup Box 1: Basic\nColumns to include:\nAMD_NO (CHAR(10), PK, NOT NULL) → Amendment Number (Unique identifier)\nAMDMT_NO (CHAR(15))→ Amendment Display / Reference Number- auto generated\nAMD_DATE (DATE, NOT NULL) → Amendment Date\nAMD_TYPE (CHAR(3))→ Amendment Type\nREAS_DESC (VARCHAR2(2000))→ Reason for Amendment\nQUOT_NO (CHAR(10), NOT NULL)→ Quotation Number (Reference) - This field editable.\nQUOT_DATE (DATE, NOT NULL)→ Quotation Date\nQUOT_TYPE (CHAR(1))→ Quotation Type\nORIG_QUOT_REF (CHAR(10))→ Original Quotation Reference\nPARENT_QUOT_NO (CHAR(10))→ Parent Quotation Number\nCUST_CODE (CHAR(10), NOT NULL)→ Customer Code\nOPPR_ID (CHAR(10))→ Opportunity ID\nSALES_PERS (CHAR(10))→ Sales Person\nINQ_DATE (DATE)→ Inquiry Date\nINQ_SOURCE (VARCHAR2(10))→ Inquiry Source\nITEM_SER (CHAR(5), NOT NULL)→ Item Series\nCURR_CODE (CHAR(5))→ Currency Code\nEXCH_RATE (NUMBER(14,6))→ Exchange Rate\nVALID_UPTO_O (DATE, NOT NULL)→ Old Validity Date (Before Amendment)\nVALID_UPTO (DATE, NOT NULL)→ New Validity Date\nREMARKS (VARCHAR2(120))→ General Remarks\n\nGroup Box 2: Status\nColumns to include:\nSTATUS (CHAR(1))→ Amendment Status (Draft / Approved / Cancelled)\nSTATUS_DATE (DATE)→ Status Updated Date\nCONFIRMED (CHAR(1))→ Confirmation Flag (Y/N)\nCONF_DATE (DATE)→ Confirmation Date\nEMP_CODE__CONF (CHAR(10))→ Confirmed By Employee\nLATEST_VERSION_NO (NUMBER(3))→ Latest Amendment Version Number\n\nGroup Box 3: Terms\nColumns to include:\nCONT_PERS (VARCHAR2(200))→ Contact Person\nFREIGHT (NUMBER(14,3))→ Freight Charges\nCR_TERM (CHAR(5))→ Credit Term\nDLV_TERM (CHAR(5))→ Delivery Term\nTERM_TABLE (CHAR(5))→ Term Table Reference\nDLV_LOCATION (VARCHAR2(200))→ Delivery Location\nLOCATION_DESCR (VARCHAR2(1000))→ Delivery Location Description\nTAX_CLASS (VARCHAR2(5))→ Tax Class\nTAX_CHAP (VARCHAR2(10))→ Tax Chapter\nTAX_ENV (VARCHAR2(10))→ Tax Environment\n\nGroup Box 4: Others\nColumns to include:\nUDF_STR1 (VARCHAR2(20))→ User Defined String\nUDF_NUM1 (NUMBER(12,3))→ User Defined Number\nSAMPLE_REF (VARCHAR2(50))→ Sample Reference\nQUOTATION_COST (NUMBER(14,3))→ Total Quotation Cost\nPRNP_QUOT (NUMBER(3))→ Print Quotation Flag\nSITE_CODE (CHAR(5))→ Site Code\nPARENT__TRAN_ID (CHAR(10))→ Parent Transaction ID\nSTOCKIST_CODE__DLV (CHAR(200))→ Delivery Stockist Code\nAPRV_STATUS (CHAR(1))→ Approval Status\nENQ_NO (VARCHAR2(255))→ Enquiry Number\nREV__TRAN (CHAR(1))→ Reversal Transaction Flag\nIS_ITEMS_GENERATED (CHAR(1))→ Item Generation Status\nQUOT_WF_PRC_ID (VARCHAR2(50))→ Workflow Process ID\nREJECTION_REMARK (VARCHAR2(100))→ Rejection Reason\nSTOCKIST_NAME (VARCHAR2(1000))→ Stockist Name\nVALID_UPTO_SUPP (DATE)→ Supplier Validity Date\nVAT (NUMBER(12,3))→ VAT Amount\nALL_ITEMS_APPROVED (CHAR(1))→ All Items Approved Flag\nCHG_DATE (DATE, NOT NULL)→ Last Change Date\nPRICE_LIST (CHAR(5))→ Price List\nFROM_DATE (DATE)→ Valid From Date\nTO_DATE (DATE)→ Valid To Date\nADDL_CHRG (NUMBER(14,3))→ Additional Charges\nWF_STATUS (CHAR(1))→ Workflow Status\nEFF_DATE (DATE)→ Effective Date\nSUPPLY_LEADTIME (NUMBER(5))→ Supply Lead Time (Days)\nCHG_USER (CHAR(10), NOT NULL)→ Last Changed By User\nCHG_TERM (VARCHAR2(15), NOT NULL)→ Change Terminal / System\ncreate only single form\nstay all the fields are non editable expect REAS_DESC,VALID_UPTO,QUOT_NO, AMD_TYPE\n\nIMPORTANT : Don't add joins.\ni want to add item change to all the field and get field value to 'sales_quot' this tableName, expect some field don't add item_change AMD_NO (CHAR(10), PK, NOT NULL) → Amendment Number (Unique identifier)\nAMDMT_NO (CHAR(15))→ Amendment Display / Reference Number- auto generated\nAMD_DATE (DATE, NOT NULL) → Amendment Date\nAMD_TYPE (CHAR(3))→ Amendment Type\nREAS_DESC (VARCHAR2(2000))→ Reason for Amendment\n\ni have created a sql function for quot_no field thats name as GET_QUOTATION_DETAILS\ni want in that quot_no field change the all fields values"
}
]
}
\ No newline at end of file
{
"application": {
"id": "SAL",
"title": "Sales Quotation Stockist Amendment",
"description": "Application to manage and view Sales Quotation Stockist Amendments, including viewing details of amendments, customers, stockists, and distributors.",
"icon": "assignment",
"theme_color": "#1976d2",
"group": "Sales",
"generated": true
},
"navigation": [
{
"id": "Draft_Application.1",
"title": "Stockist Amendment Management",
"parent_id": "",
"icon_image": "folder",
"description": "Business process for managing Sales Quotation Stockist Amendments.",
"obj_name": "SALESQUOTSTKAMD_stockist_amendment_mgmt",
"obj_type": "-",
"menu_path": "Draft_Application.1",
"functional_specs": "Parent navigation for all activities related to Sales Quotation Stockist Amendments."
},
{
"id": "Draft_Application.1.1",
"title": "Stockist Amendment Master",
"parent_id": "Draft_Application.1",
"icon_image": "assignment",
"description": "View details of Sales Quotation Stockist Amendments in a non-editable form.",
"obj_name": "sales_quot_amd23",
"obj_type": "T",
"menu_path": "Draft_Application.1.1",
"functional_specs": "Group Box: General \ntable name: SALES_QUOT_STOCKIST_AMD\ninclude below columns:\nSr. no.\tColumn Name\tData Type\t\t\n1\tAMD_NO\tCHAR(10)\tNOT NULL\tck - Amendment No \n2\tQUOT_NO\tCHAR(10)\t\t- Quotation Number \n3\tCUST_CODE\tCHAR(10)\t\t-Customer Code \n4 CUST_NAME - Customer Name - Compute Column\n5\tCUST_CODE__STK\tCHAR(10)\t- Customer Code Stockist\t\n6 STOCK_CUST_NAME -Stockist CUST_NAME - compute column\n7\tCUST_CODE__DIST\tCHAR(10)\t- Customer Code Distributor\t\n8 DIST_CUST_NAME - Distributor CUST_NAME - Compute Column\n\n\nStay all fields non-editable\nImportant: Create only single Stockist Master form with one Group Box General."
}
]
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"transaction": {
"actions": [
],
"attach_docs": [
"Amendment Request Form",
"Supporting Documents"
],
"follow_up_actions": [
"on-show,print:report_layout('sales_quot_amd_audit','Printable audit trail of amendment record')"
],
"obj_name": "sales_quot_amd23",
"sql_models": [
{
"sql_model": {
"columns": [
{
"column": {
"col_id": "1",
"col_type": "CHAR",
"db_name": "AMD_NO",
"db_size": "10",
"default_function": "",
"default_value": "",
"descr": "Amendment Number",
"edit_mask": "",
"expression": "",
"format": "",
"group_name": "General",
"heading": "Amendment No",
"hidden": "",
"key": true,
"lookup": "",
"mandatory": "true",
"name": "AMD_NO",
"protect": "1",
"table_display_name": "Sales Quotation Stockist Amendments",
"table_name": "QUOT_STOCKIST_AMD",
"validations": [
"expression('AMD_NO.length > 0')"
],
"width": 100,
"x": "10",
"y": "10"
}
},
{
"column": {
"col_id": "2",
"col_type": "CHAR",
"db_name": "QUOT_NO",
"db_size": "10",
"default_function": "",
"default_value": "",
"descr": "Quotation Number",
"edit_mask": "",
"expression": "",
"format": "",
"group_name": "General",
"heading": "Quotation No",
"hidden": "",
"key": false,
"lookup": "",
"mandatory": false,
"name": "QUOT_NO",
"protect": false,
"table_display_name": "Sales Quotation Stockist Amendments",
"table_name": "QUOT_STOCKIST_AMD",
"validations": "",
"width": 100,
"x": "20",
"y": "20"
}
},
{
"column": {
"col_id": "3",
"col_type": "CHAR",
"db_name": "CUST_CODE",
"db_size": "10",
"default_function": "",
"default_value": "",
"descr": "Customer Code",
"edit_mask": "",
"expression": "",
"format": "",
"group_name": "General",
"heading": "Customer Code",
"hidden": "",
"key": false,
"lookup": "",
"mandatory": false,
"name": "CUST_CODE",
"protect": "1",
"table_display_name": "Sales Quotation Stockist Amendments",
"table_name": "QUOT_STOCKIST_AMD",
"validations": "",
"width": 100,
"x": "30",
"y": "30"
}
},
{
"column": {
"col_id": "5",
"col_type": "CHAR",
"db_name": "CUST_CODE__STK",
"db_size": "10",
"default_function": "",
"default_value": "",
"descr": "Customer Code Stockist",
"edit_mask": "",
"expression": "",
"format": "",
"group_name": "General",
"heading": "Stockist Code",
"hidden": "",
"key": false,
"lookup": "",
"mandatory": false,
"name": "CUST_CODE__STK",
"protect": "1",
"table_display_name": "Sales Quotation Stockist Amendments",
"table_name": "QUOT_STOCKIST_AMD",
"validations": "",
"width": 100,
"x": "50",
"y": "50"
}
},
{
"column": {
"col_id": "7",
"col_type": "CHAR",
"db_name": "CUST_CODE__DIST",
"db_size": "10",
"default_function": "",
"default_value": "",
"descr": "Customer Code Distributor",
"edit_mask": "",
"expression": "",
"format": "",
"group_name": "General",
"heading": "Distributor Code",
"hidden": "",
"key": false,
"lookup": "",
"mandatory": false,
"name": "CUST_CODE__DIST",
"protect": "1",
"table_display_name": "Sales Quotation Stockist Amendments",
"table_name": "QUOT_STOCKIST_AMD",
"validations": "",
"width": 100,
"x": "70",
"y": "70"
}
}
],
"form_descr": "View details of Sales Quotation Stockist Amendments in a non-editable form.",
"form_no": "1",
"form_title": "Sales Quotation AMD",
"joins": {
"join_predicates": {
"joins": [
{
"main_table": true,
"table": "QUOT_STOCKIST_AMD",
"table_descr": "Sales Quotation Stockist Amendments"
}
]
}
}
}
}
]
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
CREATE OR REPLACE NONEDITIONABLE FUNCTION GET_QUOTATION_DETAILS (
p_quot_no IN VARCHAR2
) RETURN VARCHAR2 IS
v_return_json VARCHAR2(4000);
BEGIN
-- 1. Check for empty input
IF p_quot_no IS NULL OR TRIM(p_quot_no) IS NULL THEN
RETURN '{"data":{}}';
END IF;
-- 2. Use JSON_OBJECT for clean, type-safe construction
SELECT
JSON_OBJECT(
'data' VALUE JSON_OBJECT(
'QUOT_DATE' VALUE TO_CHAR(quot_date, 'DD/MM/YYYY'),
'QUOT_TYPE' VALUE quot_type,
'CUST_CODE' VALUE cust_code,
'INQ_DATE' VALUE TO_CHAR(inq_date, 'DD/MM/YYYY'),
'INQ_SOURCE' VALUE inq_source,
'VALID_UPTO_O' VALUE TO_CHAR(valid_upto, 'DD/MM/YYYY'),
'SALES_PERS' VALUE sales_pers,
'CURR_CODE' VALUE curr_code,
'EXCH_RATE' VALUE NVL(exch_rate, 0),
'CR_TERM' VALUE cr_term,
'DLV_TERM' VALUE dlv_term,
'TERM_TABLE' VALUE term_table,
'PRICE_LIST' VALUE price_list,
'ITEM_SER' VALUE item_ser,
'STATUS_DATE' VALUE TO_CHAR(status_date, 'DD/MM/YYYY'),
'CONF_DATE' VALUE TO_CHAR(conf_date, 'DD/MM/YYYY'),
'EMP_CODE__CONF' VALUE emp_code__conf,
'LATEST_VERSION_NO' VALUE NVL(latest_version_no, 0),
'ORIG_QUOT_REF' VALUE orig_quot_ref,
'PARENT_QUOT_NO' VALUE parent_quot_no,
'CONT_PERS' VALUE cont_pers,
'FREIGHT' VALUE freight,
'DLV_LOCATION' VALUE dlv_location,
'LOCATION_DESCR' VALUE location_descr,
'UDF_STR1' VALUE udf_str1,
'UDF_NUM1' VALUE NVL(udf_num1, 0),
'SAMPLE_REF' VALUE sample_ref,
'QUOTATION_COST' VALUE NVL(quotation_cost, 0),
'PRNP_QUOT' VALUE prnp_quot,
'REJECTION_REMARK' VALUE rejection_remark,
'STOCKIST_NAME' VALUE stockist_name,
'VALID_UPTO_SUPP' VALUE TO_CHAR(valid_upto_supp, 'DD/MM/YYYY'),
'VAT' VALUE NVL(vat, 0),
'ALL_ITEMS_APPROVED' VALUE all_items_approved
ABSENT ON NULL -- This keeps the JSON small by omitting null fields
)
)
INTO v_return_json
FROM sales_quot
WHERE TRIM(quot_no) = TRIM(p_quot_no);
RETURN v_return_json;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN '{"data":{}}';
WHEN OTHERS THEN
-- Log error here if needed
RETURN '{"data":{}}';
END GET_QUOTATION_DETAILS;
/
CREATE OR REPLACE NONEDITIONABLE FUNCTION GET_QUOTATION_DET_DETAILS
(
p_item_code IN VARCHAR2
)
RETURN VARCHAR2
IS
v_json_output VARCHAR2(32767);
BEGIN
IF p_item_code IS NULL OR TRIM(p_item_code) IS NULL THEN
RETURN '{"data":{}}';
END IF;
SELECT JSON_OBJECT(
'data' VALUE JSON_OBJECT(
'LINE_NO' VALUE line_no,
'ITEM_CODE' VALUE item_code,
'QUANTITY_O' VALUE NVL(quantity,0),
'UNIT' VALUE unit,
'RATE__CLG' VALUE NVL(rate__clg,0),
'UNIT__RATE_O' VALUE unit__rate,
'SCH_DATE' VALUE TO_CHAR(sch_date,'DD/MM/YYYY'),
'SAMPL_QTY' VALUE NVL(sampl_qty,0),
'UNIT__SAMPL' VALUE unit__sampl,
'REMARKS' VALUE remarks,
'ORDER_QTY' VALUE NVL(order_qty,0),
'ORDER_DATE' VALUE TO_CHAR(order_date,'DD/MM/YYYY'),
'PACK_INSTR' VALUE pack_instr,
'CR_TERM' VALUE cr_term,
'DLV_TERM' VALUE dlv_term,
'ITEM_SPEC' VALUE item_spec,
'PACK_CODE' VALUE pack_code,
'SCH_DATE_UPTO' VALUE TO_CHAR(sch_date_upto,'DD/MM/YYYY'),
'PACK_QTY' VALUE NVL(pack_qty,0),
'DLV_AT' VALUE dlv_at,
'SPEC_REF' VALUE spec_ref,
'UOM_RATE' VALUE uom_rate,
'UOM_SAMPLE' VALUE uom_sample,
'PACKING' VALUE packing,
'SAMPLE_REF' VALUE sample_ref,
'RATE_NEW' VALUE NVL(rate_new,0),
'PRNP_QUOT' VALUE prnp_quot,
'ITEM_TYPE' VALUE item_type,
'PTS' VALUE NVL(pts,0),
'PTR' VALUE NVL(ptr,0),
'MIN_SUPP_LEAD_TIME' VALUE NVL(min_supp_lead_time,0),
'NO_OF_UNITS' VALUE NVL(no_of_units,0),
'ITEM_COST' VALUE NVL(item_cost,0),
'DISCOUNT' VALUE NVL(discount,0),
'PRICE_TYPE' VALUE price_type,
'QUOTED_RATE' VALUE NVL(quoted_rate,0),
'SUPPLY_LEADTIME' VALUE NVL(supply_leadtime,0),
'NO_ART' VALUE NVL(no_art,0),
'VAT_OPT' VALUE vat_opt,
'TAX_CLASS' VALUE tax_class,
'TAX_CHAP' VALUE tax_chap,
'TAX_ENV' VALUE tax_env,
'SITE_CODE__MFG' VALUE site_code__mfg,
'QUOTED_RATE_VAT' VALUE NVL(quoted_rate_vat,0),
'TAX_AMT' VALUE NVL(tax_amt,0),
'QUOT_CRITERIA' VALUE quot_criteria,
'ITEM_SER' VALUE item_ser,
'ENQ_NO' VALUE enq_no,
'MRP_VALUE' VALUE NVL(mrp_value,0),
'REL_QTY' VALUE NVL(rel_qty,0),
'REL_DATE' VALUE TO_CHAR(rel_date,'DD/MM/YYYY'),
'BAL_QTY' VALUE NVL(bal_qty,0),
'RATE' VALUE NVL(rate,0),
'DIMENSION' VALUE dimension,
'FROM_DATE' VALUE TO_CHAR(from_date,'DD/MM/YYYY'),
'TO_DATE' VALUE TO_CHAR(to_date,'DD/MM/YYYY'),
'MARGIN_PERC' VALUE NVL(margin_perc,0),
'MARGIN_AMT' VALUE NVL(margin_amt,0),
'NET_AMT' VALUE NVL(net_amt,0),
'PTD' VALUE NVL(ptd,0)
ABSENT ON NULL
)
)
INTO v_json_output
FROM sales_quotdet
WHERE TRIM(item_code) = TRIM(p_item_code);
RETURN v_json_output;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN '{"data":{}}';
WHEN OTHERS THEN
RETURN '{"data":{}}';
END GET_QUOTATION_DET_DETAILS;
/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment