Lc Create Modify
Doubts
- This Bill of Exchange is Live and may not be deleted –> this we will check using connected docs
Bill of Exchange (BOE)
Create Operation
| Label | Property | Notes |
|---|---|---|
| BE Details | BEDetails | Required field |
| Date | dated | Required, defaults to current date |
| Due Date | BEDuedate | Required, defaults to current date |
| Party Name | partyid | Required, from party dropdown |
Modify Operation
| Label | Property | Notes |
|---|---|---|
| BE No | BENo | Readonly, cannot be modified |
| Party Name | PartyName | Readonly, cannot be modified |
| BE Details | BEDetails | Can be modified |
| Date | dated | Can be modified |
| Due Date | BEDuedate | Can be modified |
Delete Operation
- All delete operations require a delete reason
- Deletions are logged in the audit trail
- Delete reason is mandatory for audit compliance
- Validation: This Bill of Exchange is Live and may not be deleted
SQL Queries for BOE
Create BOE
INSERT INTO BE (BENo, BEDetails, dated, BEDuedate, partyid)
VALUES (@BENo, @BEDetails, @dated, @BEDuedate, @partyid)Modify BOE
UPDATE BE SET BEDetails=@BEDetails, dated=@dated, BEDuedate=@BEDuedate
WHERE id=@idDelete BOE
DELETE FROM BE WHERE id = @idValidation Rules for BOE
| Operation | Field | Validation Rule | Error Message |
|---|---|---|---|
| Create/Modify | BEDetails | Required, MaxLength(75) | BE Details needs to be filled |
| Create/Modify | BEDuedate | Required, > dated | Due date cannot be less than {dated} |
| Create/Modify | BEDuedate | Required, < dated + 100 days | BEDuedate cannot exceed {maxduedate} |
| Create/Modify | partyid | Required | Party needs to be selected |
Letter of Credit (LC)
Create Operation
| Label | Property | Notes |
|---|---|---|
| LC Details | LcDetails | Required, MaxLength(75) |
| Date | dated | Required, defaults to current date |
| Party Name | partyid | Required, from party component |
| Currency | currency | Required, from currency dropdown |
| Conversion Rate | conversionrate | Required, max 999.9999 |
| Amount | amount | Required, max 99999999.99 |
| Tolerance | tolerance | Required, max 999 |
| Valid Upto Date | validupto | Required, defaults to current date |
| Last Shipment Date | shipdate | Optional, defaults to current date |
| Notes | notes | Optional |
Modify Operation
| Label | Property | Notes |
|---|---|---|
| LC Number | LcNo | Readonly, cannot be modified |
| LC Details | LcDetails | Can be modified |
| Date | dated | Can be modified |
| Valid Upto Date | validupto | Can be modified |
| Currency | currency | Can be modified |
| Conversion Rate | conversionrate | Can be modified |
| Amount | amount | Can be modified |
| Tolerance % | tolerance | Can be modified |
| Valid Upto | validupto | Can be modified |
| LC Status | status | Can be modified |
| Last Ship Date | shipdate | Can be modified |
| Notes | notes | Can be modified |
Delete Operation
- Delete reason is required
SQL Queries for LC
Create LC
INSERT INTO LC (LCNo, LCDetails, dated, partyid, currency, conversionrate, amount,
tolerance, validupto, yearlcno, status, notes, shipdate)
VALUES (@LCNo, @LCDetails, @dated, @partyid, @currency, @conversionrate, @amount, @tolerance,
@validupto, @yearlcno, @status, @notes, @shipdate)Modify LC
UPDATE LC SET LCDetails=@LCDetails, dated=@dated, currency=@currency, conversionrate=@conversionrate,
amount=@amount, tolerance=@tolerance, validupto=@validupto, status=@status,
shipdate=@shipdate, notes=@notes
WHERE id=@idDelete LC
DELETE FROM LC WHERE id = @idValidation Rules for LC
| Operation | Field | Validation Rule | Error Message |
|---|---|---|---|
| Create/Modify | LcDetails | Required, MaxLength(75) | LC Details needs to be filled |
| Create/Modify | validupto | Required, between dated and dated + 1 year | Valid Upto date must be between {dated} and {dated+1year} |
| Create/Modify | currency | Required | Currency needs to be filled |
| Create/Modify | conversionrate | Required, Range(0.0001, 999.9999) | Conversion Rate must be between 0.0001 and 999.9999 |
| Create/Modify | amount | Required, Range(1, 99999999.99) | Amount must be between 1 - 99999999.99 |
| Create/Modify | tolerance | Required | Tolerance needs to be filled |
| Create/Modify | partyid | Required | Party needs to be selected |
| Modify | amount | Amount + tolerance >= total bill amount | LC amount (plus tolerance) must be more than total amount of bills |
Link BOE
- This feature will be on LC details page as a link
- When user clicks this link, it will redirect to a new razor page LCBeoLinkIndex
- In that razor page, show all BE with same party along with checkboxes to link them
- After user selects the BOE, insert them into a new table LinkLcBoe
Create Table
CREATE TABLE LinkLcBoe (
id INT PRIMARY KEY IDENTITY(1,1),
yearlcno NVARCHAR(12),
yearbeono NVARCHAR(12)
);Query for LCBeoLinkIndex
SELECT BENo, dated, partyid
FROM BE
WHERE partyid=@partyid AND CONVERT(DATE,dated)>=CONVERT(DATE,@dated)