Vous êtes sur la page 1sur 20

Page No.

: 1

T.ADITYA
Knowledge Transfer Document

Version No. 1

12-08-2017

NAME DATE PROJECT COMPANY

AUGMENT
Prepared By ADITYA T 12-08-2017 NSPIRA SOFTSOL
Page No. : 2

Knowledge Transfer Document

Table of Contents

1. SCREEN FUNCTIONALITY AND ITS DEPENDENCIES


Page No. : 3

SCREEN FUNCTIONALITY AND ITS DEPENDENCIES

1. Modules
a. Purchase
i. Purchase Order
ii. Direct PO
iii. Invoice Management
iv. DC TO Invoice
v. Rate Contract
vi. PO Register
vii. PO Configuration
b. Inventory
i. Scrap Sales
c. Common
i. Apex Management

2. File Upload Functionality For Grid


Page No. : 4

Purchase Order

Dependencies:
i. Item Type of Item From Item Master
ii. Item Head Master
iii. Purchase Order With(LovValues)
iv. Active User Branch
v. Purchase Indent
vi. Quotation
vii. Rate Contract With Rate Contract Type (LovValues)
viii. Vendor Management
ix. Vendor State
x. Asset Type (LovValues).
xi. Item Master
xii. Tax Configuration (Vendor Master, Item Master)
xiii. Earlier Raised Purchase Order from Purchase Order Transaction.

Functionality at Field Level:


i. Regular PO Checkbox for raising regular PO against Approved and Active Purchase
Indents.
ii. Direct PO checkbox for raising PO without Purchase Indents.
iii. Item Type 1.Consumable and 2.Asset. For Fetching the Items with specific item type.
iv. Item Head For fetching the items categorized under Item Head.
v. Purchase Order With :
a. NO QUOTATION
b. QUOTATION
c. RATE CONTRACT
d. EARLIER PO
But Earlier PO gets displayed in dropdown if Regular PO checkbox is checked.
vi. Indents :
Displayed approved Purchase Indents from different branches and item type selected
if Regular PO checkbox is checked and if Purchase Order With value selected other than
Earlier PO.
vii. Quotation :
Displayed approved quotations with in valid from and valid to dates and item type
selected and quotation dropdown is visible if Purchase Order With value selected is
Quotation.
viii. Rate Contract :
If Purchase Order With value selected is Rate Contract then two dropdowns gets
displayed. They are 1.Rate Contract Type and 2. Rate Contract
Rate Contract Type: LovValues (Organization and Branch)
Page No. : 5

Rate Contract contains approved rate contract from P_Blanket_PO_M table with
selected rate contract type and matching item head and item type selected with in valid
from and to dates.
ix. Asset Type :
a. Capital
b. Revenue
x. Distribution Schedule Checkbox for Distribution schedule for purchase order items.
xi. Get Items:
Combinations are created from the above fields are:
i. Regular PO with NO QUOTATION
I. For this scenario Items are fetching from selected Purchase Indent
Line Items.
ii. Regular PO with QUOTATION
I. For this scenario Items are fetching from selected Purchase Indent
Line Items including Quotation Rate from matched purchase indent
ItemId with ItemId of Quotation Line Item.
iii. Regular PO with RATE CONTRACT
I. For this scenario Items are fetching from selected Purchase Indent
Line Items including Rate Contract Price from matched purchase
indent ItemId with ItemId of Rate Contract Line Item.
iv. Regular PO with Earlier PO
I. For this scenario Items are fetching from selected Purchase Order Line
Items. But for this scenario Rate field in PO Line Item form is
disabled.
v. Direct PO with NO QUOTATION
I. For this scenario Items are fetching from selected Item Head from
Inventory Module.
vi. Direct PO with QUOTATION
I. For this scenario Items are fetching from selected Item Head including
Quotation Rate from matched ItemId of selected Item Head Items with
ItemId of Quotation Line Item
vii. Direct PO with RATE CONTRACT
I. For this scenario Items are fetching from selected Rate Contract Line
Items including Rate Contract Item Price.
During Regular PO case Items are displayed in Grid and we can edit only Quantity, Price
Discount, Discount Type and Free Units. But for Regular PO with Earlier PO case Price is non
editable.
During Direct PO case Items are loaded into the dropdowns, based on the selected category,
subcategory is loaded and similarly item, model and specification.
New functionalities added to PO recently
Page No. : 6

1. New Items can be added in the combination Regular PO with Quotation as well as
in Regular PO with Earlier PO. In this, when Add New Item button is clicked the
Items are loaded into respective dropdowns like Direct PO combination scenarios.
2. During the above case if item is added to the grid which already contains the same
item then quantity, price and free units gets updated and total gets recalculated and
updated into the grid.
Tax Information Rendering:
1. Tax for Item is configured in Vendor Master and Item Master.
2. If selected vendor may have three options related to Tax
a. None -> Tax is not applicable
b. VAT
c. TOT
3. We can access this information during the Get Items button click event. We can get
the tax information of vendor in terms of TaxMasterId
a. 0 -> None
b. 1 -> VAT
c. 2 -> CST
d. 3 -> TOT
e. 6 -> CFORM
4. If vendor is VAT licensed vendor but vendor primary address state and active branch
state are different then CST is applicable. In this scenario if branch is having CFORM
then CFORM type Tax is applicable. If active branch state and vendor primary address
state are same then VAT is applicable. But in the case of CFORM scenario, we are
returning CST to the front end and seeking user permission related to CFORM is that
branch contains or not.
5. If vendor is TOT licensed vendor and branch state and vendor state are same then we are
returning Tax information configured in State screen.
6. Exceptional scenario is TOT case if vendor is TOT vendor and branch state and vendor
state are different then we are displaying the warning message to the user.
7. When the item is selected then the tax configured in Item is verified based on
TaxMasterId must be checked against tax information of vendor. Then related tax is
returned is rendered at Tax Field.
8. Exceptional scenario is TOT case if vendor is TOT vendor and branch state and vendor
state are same then State Screen TOT Tax information.

Note:
Used SaveOrUpdateEntity method in BaseDao accessed using PurchaseOrderDao.
Page No. : 7

Direct PO
Dependencies:
a) Active User Branch
b) Item Head Master
c) Financial Year Months
d) Item Master
e) Vendor Master
f) Direct PO Configuration Items (In PO Configuration Screen).
g) Active User Branch Items(Store Items)
h) Tax Configuration (Vendor Master, Item Master).
Functionality:
i. Direct PO Add screen is displayed if that active branch is configured in PO
Configuration screen.
ii. Financial Year Months data is displayed to the user which are from the next
month after the last month end process month to the current month current date.
iii. As Direct PO is directly creating the invoice information logged-in user must
have the invoice screen creation permission for invoice workflow initiation.
iv. Items are fetched from the PO configured Items along with that it is also
mapped to Store Items and Need to configured in Item Head Master.
Tax Information Rendering:
Fetching the tax information is same as that of Purchase Order Screen.
Note:
Used SaveDirectPOInvoice method in PurchaseOrderDao.
Page No. : 8

Invoice
Dependencies:
a) Invoice Type (LovValues)
b) Vendor Master
c) Bill Number
d) Work Order Transaction
e) Financial Year Months
f) Active Branch User
Functionality:
i. Financial Year Months data is displayed to the user which are from the next month
after the last month end process month to the current month current date.
ii. Invoice Type:
a) PURCHASE ORDER
b) WORK ORDER
iii. If invoice type selected is Purchase Order Bill No is displayed depends on Invoice
No is entered in Receipt Screen during GRN Scenario.
Based on the Bill No Selected related GRN No. and PO No. is displayed in a label.
iv. If invoice type selected is Work Order Work Orders are displayed in dropdown
which are also raised against Active Branch.
v. Vendor dropdown is loaded by default but when we select invoice type is Purchase
Order then vendor dropdown is reloaded with the branch mapped and Vendor
Category as Item and GRN is raised against to that vendor. If invoice type is Work
Order then vendor dropdown gets disabled and based on the work order selection
vendor dropdown is auto populated.
vi. Get Items either it will fetch the GRN Items with prepopulated Tax Information From
PO if invoice type selected is PURCHASE ORDER or it will fetch the Work order
items based on the selected Work order with pre-populated tax information of Work
order.
vii. Saving the Invoice with Invoice Type as PURCHASE ORDER then stock
information updated with price related to that stock item and makes GRN No. is not
available for next Invoice creation. If invoice type as WORK ORDER then that
selected work order is not available for next invoice creation after current invoice
creation.
viii. Same screen is used for invoice approval and even invoice is raised from DC to
Invoice Screen.
ix. New functionality is added for Adding New Service Item in case of invoice type is
Work Order and service items are loaded into the dropdowns based on the branch
mapped and vendor mapped service items. NewServiceItemFlg is used to
differentiating the work order item and added new service item in invoice screen.
Page No. : 9

Note: Used InvoiceDao for save/update the invoice information.

DC To Invoice
Dependencies:
a) Active User Branch
b) Vendor Master
c) Purchase Order No.
d) GRN
e) Financial Year Months
Functionality:
i. Financial Year Months data is displayed to the user which are from the next month after
the last month end process month to the current month current date.
ii. Vendor Dropdown is loaded with active user branches and vendor category as Item.
iii. Purchase Order No. is loaded with PO raised against active branch as well raised to the
vendor which is selected and Purchase Order workflow status is delivered.
iv. Based on the Purchase Order No. selected, GRNs are loaded into the dropdown which
are created against selected PO.
v. Invoice No. entered in the Invoice No. text box is validating against the Invoice table
invoice_cd field.
vi. Get Items Button click will fetch the grouped Multiple Receipt Items into the grid with
pre-populated tax information.
vii. Saving the DC to Invoice information also updates the multiple stock items with price
relatively. Also makes the Purchase Order is not available to the next time DC to
invoice creation.
Note: Used InvoiceDao for save/update the DCtoInvoice information.
Page No. : 10

Rate Contract
Dependencies:
a) Vendor Master
b) Rate Contract Type (LovValues)
c) Item Type (LovValues)
d) Item Head
Functionality:
i. Vendor Master is loaded into the dropdown based on the vendor category as Item
ii. Rate Contract Type:
a) BRANCH
b) ORGANIZATION
iii. Item Type:
a) CONSUMABLE
b) ASSET
iv. Item Head dropdown is loaded with item head master data.
v. Get Items will fetch the data if selected rate contract type is Branch then Items are
loaded into the drop down if that item is falls under selected item type as well that item
is mapped to store items with active branch as StoreId and categorized under selected
item head.
If selected rate contract type is ORGANIZATION then Items are loaded into the
respective dropdowns if that item is falls under selected item type as well that item is
categorized under selected item head.
Saving the rate contract initiates the work flow transaction.

Note: Used BaseDao Create and SaveOrUpdate Method for Save and Update the rate contract
information accessed using BlanketPODao.
Page No. : 11

PO Register

Dependencies:
a) Active User Branches

Functionality:
i. Get Items Button click logic loads the Purchase Order data into the grid based on the
selected branch and selected from and to dates and that PO is approved.
ii. Default from and to dates are financial year start date and end date as user remains
unselected when clicking on Get Items Button.
iii. Purchase Order Type is Direct PO or Indent
iv. Direct PO in the scenario when direct PO is selected in PO screen as well as from Direct
PO raised from Direct Purchase Order screen.
v. Indents scenario in which regular PO is selected in PO screen.
Page No. : 12

PO Configuration

Dependencies:
a) Active User Branches
b) Item Category
c) Item Sub Category
d) Item Master
Functionality:
i. In this screen we are configuring Direct PO Items available for selecting Items in Direct
PO screen for different branches.
ii. Standard PO Configuration for checking the Quotation Analysis is required or not if
required, then how many numbers of quotations are required for raising the Purchase
Order from Quotation Analysis screen.
iii. Saving this configuration information after saving into DB successfully, website
redirects to the same page.

Note: Used SaveOrUpdate Method in BaseDao accessed using PPoConfigDao.


Page No. : 13

Scrap Sales

Dependencies:
a) Active User Warehouses
b) Vendor Master
c) Transport Cost Bared By (LovValues)
d) Transport Type (LovValues)
e) VEHICLE MASTER
f) Scrap Item Master
g) Scrap Item Available Quantity From Scrap Stock
Functionality:
i. Vendor Dropdown is loaded with active user branches and vendor category as Item.
ii. Based on the transport required transport information is captured against scrap sales.
iii. If transport required is false then no information is captured else if it is true then
transport information like Transport Cost Bared By, Transport Type, etc. is captured.
iv. Transport Cost Bared By:
a) OWN VEHICLE
b) THIRD PARTY VEHICLE
v. Transport Type :
a) ISSUING PARTY
b) RECEIVING PARTY
vi. If Transport Type is selected as ISSUING PARTY then approved Vehicle Numbers are
loaded into the dropdown. If Transport Type is selected as RECEIVING PARTY then
user need to enter the vehicle number into the textbox which allows only alphanumeric.
vii. Scrap Items are loaded into the dropdown from scrap item master.
viii. When scrap item is selected then available quantity of that warehouse gets loaded into
scope variable. This available quantity is validated against user input and it is displayed
if user entered more than this available quantity.
ix. During Final Approval of the scrap sales, scrap stock gets updated against the scrap sales
items.
Note: Used BaseDao Create and SaveOrUpdate Method for Save and Update accessed using
ScrapSaleTDao.
Page No. : 14

Apex Management

Dependencies:
a) Country Master
b) State Master
c) District Master
d) City Master
e) Apex Type (LovValues)
f) Branch Master
g) Asset Depreciation Category Master
h) PF Region Master
i) ESI Region Master

Functionality:
i. Apex Name is verifying against Company Table for unique Apex Name.
ii. Country Information is loaded into the dropdown from Country Table which are in
active.
iii. Cascading Dropdowns are using for Country Based State, for State Based District and
District Based City.
iv. Apex Type:
a) NGO
b) PROPRIETARY
c) SOCIETY
d) PVT LTD
v. Branch Information is loaded into the Main Branch dropdown from Branch Master
which are also in active.
vi. PAN No., TAN No. and Service Tax No. is captured related to the apex.
vii. Depreciation - Company Act, Depreciation - Income Tax and Depreciation Industry
Norms dropdown is loaded from Asset Depreciation Category Master.
viii. Cascading Dropdowns are using for PF Region based on State and ESI Region based on
State.
ix. Validating the respective child forms of Apex Master clicking on Add button.
x. Restricting the user from doing multiple operations on respective child grid of Apex
Master at a time and also restricting the user from Apex Master saving.

Note: Used CompanyDao for save and update.


Page No. : 15

File Upload Functionality For Grid

1. Add field 'FileName' in your line item table.


2. Add columns in hbm, class files.
3. Also include one long type property in class file with field name 'AutoGenId'.
Ex: public virtual long AutoGenId {get; set ;}
4. Also add properties FileName, AutoGenId in your BusinessEnity.
5. Map this two elements (FileName, AutoGenId) in save and read methods of mapper.
6. I added one property in SaveResponseBE
7. Create a method in your mapper to return multiple child ids. For your reference please follow
this method "GetChildIds" in PurchaseOrderMap.cs.
8. I have already implemented logic in basedao to return saved entity with method name
"SaveOrUpdateEntity".
9. Forwards this child ids to front end.
10. In your html file, add the required tags for file upload as u followed earlier. To that input type
"file" tag add attributes (data-update-child, data-model, maxsize, data-child-id) as shown in
below example.

<input type="file" id="selectedChildFile" class="form-control" ng-


model="vm.poItems.Documents" data-update-child="true" data-
model="{{$scope.isEditMode}}"

maxsize="{{vm.maxFileSize}}" data-child-id="{{$scope.record.AutoGenId}}" multiple


style="display: none;" base-sixty-four-input>

In this attributes added


data-update-child for referring line item uploads,
data-child-id for your line item sequence number.
Page No. : 16

data-model for button text in Add/Update to know that file you are uploading in grid edit click or
not.
maxsize for restricting the files uploaded by the user to 500kb size, Assign your scope object
value from the constants.js with key name "MaxFileSize".

11. Display user the uploaded filename by property "DocumentName".


12. Use another method for deleting the file as like
"vm.deleteChildFile($index,file.DocumentId,file.SequenceId)" in PurchaseOrderAddController.
13. If u want to disable the delete icon in your edit mode use ng-disabled property on that span
tag.
14. Declare one array variable for holding the multiple upload objects in your controller like "var
uploadDocuments=[];".
15. Implement the mentioned methods(displayFileUploadErrorMessage,updateModel) as it is in
your controller like in PurchaseOrderAddController.
16. Add this lines in your line item form clear logic as shown below:
If ($scope.record.AutoGenId && $scope.record.Documents && $scope.record.Documents.
Length > 0 && $scope.isEditMode)
uploadDocuments.UpdateStatus($scope.record.AutoGenId);
If ($scope.record.Documents)
$scope.record.Documents.ClearDocuments();
17. Add this lines in your LineItemGrid Add/Update Logic
a. var validFileSize = uploadDocuments.length > 0?
uploadDocuments.checkFilesSize($scope.dataele): true; ->if u have master form file upload
logic, pass that array else pass [] as parameter.
Note: check 'validFileSize' as in your if condition before adding/updating the grid for
verifying the overall size of files are in limit or not.

b. $scope.record.FileName = $scope.record.Documents &&


$scope.record.Documents.length > 0? uploadDocuments.AddDocumentMaster
($state.$current.data.screenKey, Undefined, $scope.record.AutoGenId,
$scope.record.Documents).GetDocumentName(): "";
c. if($scope.record.Documents)
$scope.record.Documents.ClearDocuments();
Page No. : 17

d. follow this line in your edit mode:


itemsGridData[index].FileName = $scope.record.FileName ?
uploadDocuments.UpdateDocumentMaster($scope.record.PoDtlId > 0? $scope.record.PoDtlId :

$scope.record.AutoGenId, $scope.record.Documents).GetDocumentName() :
uploadDocuments.AddDocumentMaster($state.$current.data.screenKey, $scope.record.PoDtlId
>0?

$scope.record.PoDtlId : undefined, $scope.record.PoDtlId || $scope.record.AutoGenId,


$scope.record.Documents).GetDocumentName();
e. if($scope.record.Documents)
$scope.record.Documents.ClearDocuments();
f. else if (!validFileSize)
modalPopUpService.showAlert("Alert", ngAppSettings.OverAllFileErrorMessage +
ngAppSettings.MaxMemSize + ngAppSettings.FileUploadMemory, "ShowAction", "Close",
"ActionButton", null, null); ->For Overall file size crossing the limitation.

18. Add the below line for displaying the filenames into your grid:
{ field: 'FileName', title: 'Upload Document' }
19. Add the below method for fetching the line item record wise uploaded documents.
function getUploadedChildFiles() {
fileUploadService.GetDocumentsByParams($state.$current.data.screenKey,
vm.poItems.AutoGenId, 2).then(function (result) {
If (result.data) {
var document = [];
angular.copy(uploadDocuments, document);
uploadDocuments = document.concat([result.data]);
$scope.record.Documents = [];
angular.copy (result.data.UploadDocuments, $scope.record.Documents);
} else
$scope.record.Documents = result.data! = null? result.data.UploadDocuments: [];
Page No. : 18

}, function (error) { modalPopUpService.showAlert ("Alert",


ngAppSettings.errorMessage, "ShowAction", "Close", "ActionButton", null, null);
});
}
20. Add the below lines in your edit click for invoking the above method:
if ($stateParams.Mode == ngAppSettings.PageMode.Add)
$scope.record.Documents = uploadDocuments.GetDocumentById
($scope.record.AutoGenId);
if ($stateParams.Mode != ngAppSettings.PageMode.Add) {
if (object.FileName &&
!uploadDocuments.DocumentExist($scope.record.AutoGenId))
getUploadedChildFiles();
else
$scope.record.Documents = uploadDocuments.GetDocumentById
($scope.record.AutoGenId);
}
21. Add the below line for grid item delete for selected index
if (index >= 0) {
uploadDocuments.DeleteUploadMaster(object.AutoGenId);
itemsGridData.splice(index, 1);
}
22. Add this line in your screen save logic
var validFileSize = uploadDocuments.length > 0?
uploadDocuments.checkFilesSize($scope.dataele): true; and check this property in your if
condition before save. If condition is true allow the user to save else display the popup message
as follows:
modalPopUpService.showAlert ("Alert", ngAppSettings.OverAllFileErrorMessage +
ngAppSettings.MaxMemSize + ngAppSettings.FileUploadMemory, "ShowAction", "Close",

"ActionButton", null, null);


23. Follow this line after the transaction save for record saving the documents:
Page No. : 19

If (uploadDocuments.length>0)
fileUploadService.UploadMultipleFiles (null,
uploadDocuments.UpdateUploadMasterTrans(result.data.Ids));
24. Add this line for your deleting the files uploaded
$scope.deleteChildFile = function (index, field, sequenceId) {
if ($scope.viewMode == false) {
document.getElementById("selectedChildFile").value = '';
if (!fileId && !sequenceId)
$scope.record.Documents.splice (index, 1);
else if (sequenceId) {
uploadDocuments.DeleteDocumentById (sequenceId, index);
$scope.record.Documents[index].StatusId = ngAppSettings.RecordStatus.InActive;
$scope.record.Documents[index].InActiveFlg = true;
}
}
}
25. Assign your increment value after fetching the basic form data in edit/approval/view mode as
follows:
AutoIncrementId = itemsGridData.GetLastSequenceId ($filter);

HTML:
Add one more extra attribute "data-accepted-files" to your input type file tag as shown below.
<input type="file" id="selectedFile" class="form-control" ng-model="dataele" style="display:
none;" multiple base-sixty-four-input data-accepted-files="{{acceptedFiles}}">
Controller:
Assign the acceptedFiles property in your controller as shown below:
$scope.acceptedFiles = ngAppSettings.FileExtensions.ImagesInclMicrosoftFilesInclPDF;

In our constants we have the FileExtension property and it contains


Page No. : 20

MicrosoftFilesOnly - > it accepts only MS Office Files Only


MicrosoftFilesInclPDF - > it accepts MS Office Files Include Pdf file
ImageFilesOnly - > it accepts Only Image Formats
PdfOnly - > it accepts only Pdf
ImagesInclPdfOnly - > it accepts Images including Pdf
ImagesInclMicrosoftFilesInclPDF - > it accepts MS Office Files, Image Formats and Pdf Files.

Vous aimerez peut-être aussi