Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6783694

Browse files
authored
OBPIH-7001 Add “Active” column to Product export/import (#5556)
1 parent01c79b4 commit6783694

File tree

7 files changed

+849
-817
lines changed

7 files changed

+849
-817
lines changed

‎grails-app/conf/templates/configuration/WHO_products.csv‎

Lines changed: 730 additions & 730 deletions
Large diffs are not rendered by default.
Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
Id,ProductCode,ProductType,Name,ProductFamily,Category,GLAccount,Description,UnitOfMeasure,Tags,UnitCost,LotAndExpiryControl,ColdChain,ControlledSubstance,HazardousMaterial,Reconditioned,Manufacturer,BrandName,ManufacturerCode,ManufacturerName,Vendor,VendorCode,VendorName,UPC,NDC,Created,Updated
2-
,QX039,Default,Morphine 10mg immediate release tablet,,Pain,,,Each,Tertiary Care,0.25,TRUE,,TRUE,,,,,,,,,,,,,
3-
,TS894,Default,"Morphine injection, 10mg/mL in 1mL ampoule",,Pain,,,Each,Tertiary Care,1.25,TRUE,,TRUE,,,,,,,,,,,,,
4-
,CR388,Default,Lamivudine 150mg + nevirapine 200mg + zidovudine 300mg tablet,,ARVS,,,Each,Primary Care,0.29,TRUE,,,,,,,,,,,,,,,
5-
,TZ835,Default,Lamivudine 150mg + zidovudine 300mg tablet,,ARVS,,,Each,Primary Care,0.29,TRUE,,,,,,,,,,,,,,,
6-
,CM871,Default,Lamivudine 150mg tablet,,ARVS,,,Each,Primary Care,0.29,TRUE,,,,,,,,,,,,,,,
7-
,MC017,Default,Lamivudine 30mg + nevirapine 50mg + zidovudine 60mg tablet,,ARVS,,,Each,Primary Care,0.29,TRUE,,,,,,,,,,,,,,,
8-
,GM080,Default,"Bleomycin injection, 15mg",,Cancer,,,Each,Tertiary Care,11.2,TRUE,TRUE,,,,,,,,,,,,,,
9-
,EK670,Default,"Vincristine injection, 1mL",,Cancer,,,Each,Tertiary Care,15,TRUE,TRUE,,,,,,,,,,,,,,
10-
,QX419,Default,Isoniazid 300mg + rifapentine 300mg tablet,,TB,,,Each,Primary Care,0.38,TRUE,,,,,,,,,,,,,,,
11-
,XM026,Default,Isoniazid 300mg tablet,,TB,,,Each,Primary Care,0.38,TRUE,,,,,,,,,,,,,,,
12-
,DA693,Default,Isoniazid 50mg + pyrazinamide 150mg + rifampicin 75mg tablet,,TB,,,Each,Primary Care,0.38,TRUE,,,,,,,,,,,,,,,
13-
,RV624,Default,Isoniazid 50mg + rifampicin 75mg tablet,,TB,,,Each,Primary Care,0.38,TRUE,,,,,,,,,,,,,,,
14-
,AX738,Default,"Adapter, USB-C male to HDMI + VGA female",,IT Equipment,,,Each,,25.99,,,,,,,,,,,,,,,,
15-
,GK233,Default,"Adapter, USB-C Male to HDMI Female",,IT Equipment,,,Each,,59.99,,,,,,,,,,,,,,,,
16-
,QA069,Default,"Battery, for canon LP-E6N",,IT Equipment,,,Each,,61,,,,TRUE,,,,,,,,,,,,
17-
,JG794,Default,"Camera, 600EXII-RT, Canon",,IT Equipment,,,Each,,475,,,,,,,,,,,,,,,,
18-
,PU084,Default,"Camera, Canon, EOS 80D, with 18-55mm lens, with accessories",,IT Equipment,,,Each,,1199,,,,,,,,,,,,,,,,
19-
,SJ730,Default,"Case, Tablet, Samsung Galaxy, 10.5in",,IT Equipment,,,Each,,10.95,,,,,,,,,,,,,,,,
20-
,GX785,Default,"Cellphone, Unlocked, 8GB, BLU 5.2",,IT Equipment,,,Each,New Employee Package,78.61,,,,,,,,,,,,,,,,
21-
,UB995,Default,"Charger, for Lenovo Thinkpad T400 series Laptop",,IT Equipment,,,Each,,58.55,,,,,,,,,,,,,,,,
22-
,MM489,Default,"Charger, Laptop, Lenovo, TP60/SL500",,IT Equipment,,,Each,New Employee Package,58.55,,,,TRUE,,,,,,,,,,,,
23-
,PU011,Default,"Computer, Desktop, Dell Optiplex 390 SFF",,IT Equipment,,,Each,,934,,,,TRUE,,,,,,,,,,,,
24-
,ET383,Default,"Computer, Desktop, ThinkCentre M920z",,IT Equipment,,,Each,,1115.25,,,,TRUE,,,,,,,,,,,,
25-
,ZZ113,Default,"Laptop, Dell Inspiron, T8TJG",,IT Equipment,,,Each,,879.43,,,,TRUE,,,,,,,,,,,,
26-
,ZC462,Default,"Laptop, E490, ThinkPad",,IT Equipment,,,Each,New Employee Package,779,,,,TRUE,,,,,,,,,,,,
27-
,QD991,Default,"Printer cartridge, HP 122A/Q3960A, Black",,IT Equipment,,,Each,,179.99,,,,,,,,,,,,,,,,
28-
,GH964,Default,"Printer cartridge, HP 122A/Q3961A, Cyan",,IT Equipment,,,Each,,179.99,,,,,,,,,,,,,,,,
29-
,DP854,Default,"Printer cartridge, HP 122A/Q3962A, Yellow",,IT Equipment,,,Each,,179.99,,,,,,,,,,,,,,,,
30-
,GA472,Default,"Printer cartridge, HP 122A/Q3963A, Magenta",,IT Equipment,,,Each,,179.99,,,,,,,,,,,,,,,,
31-
,UM228,Default,"Printer, Multi-function, Scanner, HP MFP 426A",,IT Equipment,,,Each,,795.3,,,,,,,,,,,,,,,,
32-
,VX576,Default,"Printer, Multifunction, Color, HP Inkjet PageWide Pro 477dw",,IT Equipment,,,Each,,1229,,,,,,,,,,,,,,,,
33-
,XJ173,Default,"Batteries, Non Rechargeable, AA",,Office Supplies,,,Each,,1.5,,,,TRUE,,,,,,,,,,,,
34-
,RU651,Default,"Batteries, Non Rechargeable, AAA",,Office Supplies,,,Each,,1.5,,,,TRUE,,,,,,,,,,,,
35-
,XJ252,Default,"Binder clips, 19mm",,Office Supplies,,,Each,,1,,,,,,,,,,,,,,,,
36-
,RS138,Default,"Binder clips, 25mm",,Office Supplies,,,Each,,1,,,,,,,,,,,,,,,,
37-
,MV069,Default,"Binder clips, 32mm",,Office Supplies,,,Each,,1,,,,,,,,,,,,,,,,
38-
,FF240,Default,"Envelope, A3, Manila",,Office Supplies,,,Each,Mail Room,0.01,,,,,,,,,,,,,,,,
39-
,DD108,Default,"Envelope, A3, White",,Office Supplies,,,Each,Mail Room,0.01,,,,,,,,,,,,,,,,
40-
,GT068,Default,Staples 23/13 pack of 1000,,Office Supplies,,,Each,Mail Room,3,,,,,,,,,,,,,,,,
41-
,PH950,Default,Staples 23/17 pack of 1000,,Office Supplies,,,Each,Mail Room,3,,,,,,,,,,,,,,,,
42-
,CG819,Default,"File cabinet, Lateral, 5-drawer",,Furniture and Equipment,,,Each,,55,,,,,,,,,,,,,,,,
43-
,UQ102,Default,"File cabinet, Lateral, 6-drawer",,Furniture and Equipment,,,Each,,55,,,,,,,,,,,,,,,,
44-
,MR962,Default,"Stool, rolling",,Furniture and Equipment,,,Each,,145.96,,,,,,,,,,,,,,,,
45-
,SZ449,Default,"Desk, Office, Wooden or metal",,Furniture and Equipment,,,Each,,250,,,,,,,,,,,,,,,,
46-
,MG983,Default,"Chair, Office, Rolling",,Furniture and Equipment,,,Each,New Employee Package,25,,,,,,,,,,,,,,,,
47-
,RZ479,Default,"Chair, Plastic",,Furniture and Equipment,,,Each,,100,,,,,,,,,,,,,,,,
48-
,HP196,Default,"Beaker, Graduated, Borosilicate glass, 100mL",,Lab,,,Each,Tertiary Care,1.5,,,,,,,,,,,,,,,,
49-
,MY523,Default,"Beaker, Graduated, Borosilicate glass, 250mL",,Lab,,,Each,Tertiary Care,2.35,,,,,,,,,,,,,,,,
50-
,BX996,Default,"Beaker, Graduated, Borosilicate glass, 400mL",,Lab,,,Each,Tertiary Care,4.05,,,,,,,,,,,,,,,,
51-
,BF640,Default,"Coat, Laboratory, Large, Unisex",,Lab,,,Each,Tertiary Care,20,,,,,,,,,,,,,,,,
52-
,QS823,Default,"Coat, Laboratory, Medium, Unisex",,Lab,,,Each,Tertiary Care,20,,,,,,,,,,,,,,,,
53-
,SJ489,Default,"Coat, Laboratory, Small, Unisex",,Lab,,,Each,Tertiary Care,20,,,,,,,,,,,,,,,,
54-
,PK000,Default,"Ethanol (ethyl alcohol), 95%, reagent grade, 16oz",,Lab,,,Each,Tertiary Care,4.71,,,,TRUE,,,,,,,,,,,,
55-
,HG966,Default,"Tube, Blood collection, K2 EDTA, Lavender top, Plastic, 4mL",,Lab,,,Each,Tertiary Care,0.068,TRUE,,,,,,,,,,,,,,,
56-
,DJ064,Default,"Tube, Blood collection, K2 EDTA, Whole blood, Lavender, 2mL (pediatric)",,Lab,,,Each,Tertiary Care,0.068,TRUE,,,,,,,,,,,,,,,
57-
,TN940,Default,"Tube, Blood collection, Serum, Red, Plastic, 3mL (pediatric)",,Lab,,,Each,Tertiary Care,0.0692,TRUE,,,,,,,,,,,,,,,
58-
,KY133,Default,"Tube, Blood collection, Serum, Red, Plastic, 4mL",,Lab,,,Each,Tertiary Care,0.0845,TRUE,,,,,,,,,,,,,,,
1+
Id,Active,ProductCode,ProductType,Name,ProductFamily,Category,GLAccount,Description,UnitOfMeasure,Tags,UnitCost,LotAndExpiryControl,ColdChain,ControlledSubstance,HazardousMaterial,Reconditioned,Manufacturer,BrandName,ManufacturerCode,ManufacturerName,Vendor,VendorCode,VendorName,UPC,NDC,Created,Updated
2+
,TRUE,QX039,Default,Morphine 10mg immediate release tablet,,Pain,,,Each,Tertiary Care,0.25,TRUE,,TRUE,,,,,,,,,,,,,
3+
,TRUE,TS894,Default,"Morphine injection, 10mg/mL in 1mL ampoule",,Pain,,,Each,Tertiary Care,1.25,TRUE,,TRUE,,,,,,,,,,,,,
4+
,TRUE,CR388,Default,Lamivudine 150mg + nevirapine 200mg + zidovudine 300mg tablet,,ARVS,,,Each,Primary Care,0.29,TRUE,,,,,,,,,,,,,,,
5+
,TRUE,TZ835,Default,Lamivudine 150mg + zidovudine 300mg tablet,,ARVS,,,Each,Primary Care,0.29,TRUE,,,,,,,,,,,,,,,
6+
,TRUE,CM871,Default,Lamivudine 150mg tablet,,ARVS,,,Each,Primary Care,0.29,TRUE,,,,,,,,,,,,,,,
7+
,TRUE,MC017,Default,Lamivudine 30mg + nevirapine 50mg + zidovudine 60mg tablet,,ARVS,,,Each,Primary Care,0.29,TRUE,,,,,,,,,,,,,,,
8+
,TRUE,GM080,Default,"Bleomycin injection, 15mg",,Cancer,,,Each,Tertiary Care,11.2,TRUE,TRUE,,,,,,,,,,,,,,
9+
,TRUE,EK670,Default,"Vincristine injection, 1mL",,Cancer,,,Each,Tertiary Care,15,TRUE,TRUE,,,,,,,,,,,,,,
10+
,TRUE,QX419,Default,Isoniazid 300mg + rifapentine 300mg tablet,,TB,,,Each,Primary Care,0.38,TRUE,,,,,,,,,,,,,,,
11+
,TRUE,XM026,Default,Isoniazid 300mg tablet,,TB,,,Each,Primary Care,0.38,TRUE,,,,,,,,,,,,,,,
12+
,TRUE,DA693,Default,Isoniazid 50mg + pyrazinamide 150mg + rifampicin 75mg tablet,,TB,,,Each,Primary Care,0.38,TRUE,,,,,,,,,,,,,,,
13+
,TRUE,RV624,Default,Isoniazid 50mg + rifampicin 75mg tablet,,TB,,,Each,Primary Care,0.38,TRUE,,,,,,,,,,,,,,,
14+
,TRUE,AX738,Default,"Adapter, USB-C male to HDMI + VGA female",,IT Equipment,,,Each,,25.99,,,,,,,,,,,,,,,,
15+
,TRUE,GK233,Default,"Adapter, USB-C Male to HDMI Female",,IT Equipment,,,Each,,59.99,,,,,,,,,,,,,,,,
16+
,TRUE,QA069,Default,"Battery, for canon LP-E6N",,IT Equipment,,,Each,,61,,,,TRUE,,,,,,,,,,,,
17+
,TRUE,JG794,Default,"Camera, 600EXII-RT, Canon",,IT Equipment,,,Each,,475,,,,,,,,,,,,,,,,
18+
,TRUE,PU084,Default,"Camera, Canon, EOS 80D, with 18-55mm lens, with accessories",,IT Equipment,,,Each,,1199,,,,,,,,,,,,,,,,
19+
,TRUE,SJ730,Default,"Case, Tablet, Samsung Galaxy, 10.5in",,IT Equipment,,,Each,,10.95,,,,,,,,,,,,,,,,
20+
,TRUE,GX785,Default,"Cellphone, Unlocked, 8GB, BLU 5.2",,IT Equipment,,,Each,New Employee Package,78.61,,,,,,,,,,,,,,,,
21+
,TRUE,UB995,Default,"Charger, for Lenovo Thinkpad T400 series Laptop",,IT Equipment,,,Each,,58.55,,,,,,,,,,,,,,,,
22+
,TRUE,MM489,Default,"Charger, Laptop, Lenovo, TP60/SL500",,IT Equipment,,,Each,New Employee Package,58.55,,,,TRUE,,,,,,,,,,,,
23+
,TRUE,PU011,Default,"Computer, Desktop, Dell Optiplex 390 SFF",,IT Equipment,,,Each,,934,,,,TRUE,,,,,,,,,,,,
24+
,TRUE,ET383,Default,"Computer, Desktop, ThinkCentre M920z",,IT Equipment,,,Each,,1115.25,,,,TRUE,,,,,,,,,,,,
25+
,TRUE,ZZ113,Default,"Laptop, Dell Inspiron, T8TJG",,IT Equipment,,,Each,,879.43,,,,TRUE,,,,,,,,,,,,
26+
,TRUE,ZC462,Default,"Laptop, E490, ThinkPad",,IT Equipment,,,Each,New Employee Package,779,,,,TRUE,,,,,,,,,,,,
27+
,TRUE,QD991,Default,"Printer cartridge, HP 122A/Q3960A, Black",,IT Equipment,,,Each,,179.99,,,,,,,,,,,,,,,,
28+
,TRUE,GH964,Default,"Printer cartridge, HP 122A/Q3961A, Cyan",,IT Equipment,,,Each,,179.99,,,,,,,,,,,,,,,,
29+
,TRUE,DP854,Default,"Printer cartridge, HP 122A/Q3962A, Yellow",,IT Equipment,,,Each,,179.99,,,,,,,,,,,,,,,,
30+
,TRUE,GA472,Default,"Printer cartridge, HP 122A/Q3963A, Magenta",,IT Equipment,,,Each,,179.99,,,,,,,,,,,,,,,,
31+
,TRUE,UM228,Default,"Printer, Multi-function, Scanner, HP MFP 426A",,IT Equipment,,,Each,,795.3,,,,,,,,,,,,,,,,
32+
,TRUE,VX576,Default,"Printer, Multifunction, Color, HP Inkjet PageWide Pro 477dw",,IT Equipment,,,Each,,1229,,,,,,,,,,,,,,,,
33+
,TRUE,XJ173,Default,"Batteries, Non Rechargeable, AA",,Office Supplies,,,Each,,1.5,,,,TRUE,,,,,,,,,,,,
34+
,TRUE,RU651,Default,"Batteries, Non Rechargeable, AAA",,Office Supplies,,,Each,,1.5,,,,TRUE,,,,,,,,,,,,
35+
,TRUE,XJ252,Default,"Binder clips, 19mm",,Office Supplies,,,Each,,1,,,,,,,,,,,,,,,,
36+
,TRUE,RS138,Default,"Binder clips, 25mm",,Office Supplies,,,Each,,1,,,,,,,,,,,,,,,,
37+
,TRUE,MV069,Default,"Binder clips, 32mm",,Office Supplies,,,Each,,1,,,,,,,,,,,,,,,,
38+
,TRUE,FF240,Default,"Envelope, A3, Manila",,Office Supplies,,,Each,Mail Room,0.01,,,,,,,,,,,,,,,,
39+
,TRUE,DD108,Default,"Envelope, A3, White",,Office Supplies,,,Each,Mail Room,0.01,,,,,,,,,,,,,,,,
40+
,TRUE,GT068,Default,Staples 23/13 pack of 1000,,Office Supplies,,,Each,Mail Room,3,,,,,,,,,,,,,,,,
41+
,TRUE,PH950,Default,Staples 23/17 pack of 1000,,Office Supplies,,,Each,Mail Room,3,,,,,,,,,,,,,,,,
42+
,TRUE,CG819,Default,"File cabinet, Lateral, 5-drawer",,Furniture and Equipment,,,Each,,55,,,,,,,,,,,,,,,,
43+
,TRUE,UQ102,Default,"File cabinet, Lateral, 6-drawer",,Furniture and Equipment,,,Each,,55,,,,,,,,,,,,,,,,
44+
,TRUE,MR962,Default,"Stool, rolling",,Furniture and Equipment,,,Each,,145.96,,,,,,,,,,,,,,,,
45+
,TRUE,SZ449,Default,"Desk, Office, Wooden or metal",,Furniture and Equipment,,,Each,,250,,,,,,,,,,,,,,,,
46+
,TRUE,MG983,Default,"Chair, Office, Rolling",,Furniture and Equipment,,,Each,New Employee Package,25,,,,,,,,,,,,,,,,
47+
,TRUE,RZ479,Default,"Chair, Plastic",,Furniture and Equipment,,,Each,,100,,,,,,,,,,,,,,,,
48+
,TRUE,HP196,Default,"Beaker, Graduated, Borosilicate glass, 100mL",,Lab,,,Each,Tertiary Care,1.5,,,,,,,,,,,,,,,,
49+
,TRUE,MY523,Default,"Beaker, Graduated, Borosilicate glass, 250mL",,Lab,,,Each,Tertiary Care,2.35,,,,,,,,,,,,,,,,
50+
,TRUE,BX996,Default,"Beaker, Graduated, Borosilicate glass, 400mL",,Lab,,,Each,Tertiary Care,4.05,,,,,,,,,,,,,,,,
51+
,TRUE,BF640,Default,"Coat, Laboratory, Large, Unisex",,Lab,,,Each,Tertiary Care,20,,,,,,,,,,,,,,,,
52+
,TRUE,QS823,Default,"Coat, Laboratory, Medium, Unisex",,Lab,,,Each,Tertiary Care,20,,,,,,,,,,,,,,,,
53+
,TRUE,SJ489,Default,"Coat, Laboratory, Small, Unisex",,Lab,,,Each,Tertiary Care,20,,,,,,,,,,,,,,,,
54+
,TRUE,PK000,Default,"Ethanol (ethyl alcohol), 95%, reagent grade, 16oz",,Lab,,,Each,Tertiary Care,4.71,,,,TRUE,,,,,,,,,,,,
55+
,TRUE,HG966,Default,"Tube, Blood collection, K2 EDTA, Lavender top, Plastic, 4mL",,Lab,,,Each,Tertiary Care,0.068,TRUE,,,,,,,,,,,,,,,
56+
,TRUE,DJ064,Default,"Tube, Blood collection, K2 EDTA, Whole blood, Lavender, 2mL (pediatric)",,Lab,,,Each,Tertiary Care,0.068,TRUE,,,,,,,,,,,,,,,
57+
,TRUE,TN940,Default,"Tube, Blood collection, Serum, Red, Plastic, 3mL (pediatric)",,Lab,,,Each,Tertiary Care,0.0692,TRUE,,,,,,,,,,,,,,,
58+
,TRUE,KY133,Default,"Tube, Blood collection, Serum, Red, Plastic, 4mL",,Lab,,,Each,Tertiary Care,0.0845,TRUE,,,,,,,,,,,,,,,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Id,ProductCode,ProductType,Name,ProductFamily,Category,GLAccount,Description,UnitOfMeasure,Tags,UnitCost,LotAndExpiryControl,ColdChain,ControlledSubstance,HazardousMaterial,Reconditioned,Manufacturer,BrandName,ManufacturerCode,ManufacturerName,Vendor,VendorCode,VendorName,UPC,NDC,Created,Updated
2-
09f5e11677d27d1d0177d4c45ba50ceb,VM903,Default,Plastic box file,,Office Supplies,5215,,,,0.49,,,true,,,,,,,INDEX ENTERPRISES,,,,,24/Feb/2021 03:59:34,01/Mar/2021 11:24:23
1+
Id,Active,ProductCode,ProductType,Name,ProductFamily,Category,GLAccount,Description,UnitOfMeasure,Tags,UnitCost,LotAndExpiryControl,ColdChain,ControlledSubstance,HazardousMaterial,Reconditioned,Manufacturer,BrandName,ManufacturerCode,ManufacturerName,Vendor,VendorCode,VendorName,UPC,NDC,Created,Updated
2+
09f5e11677d27d1d0177d4c45ba50ceb,true,VM903,Default,Plastic box file,,Office Supplies,5215,,,,0.49,,,true,,,,,,,INDEX ENTERPRISES,,,,,24/Feb/2021 03:59:34,01/Mar/2021 11:24:23

‎grails-app/services/org/pih/warehouse/product/ProductService.groovy‎

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import grails.core.GrailsApplication
1313
importgrails.gorm.transactions.Transactional
1414
importgrails.validation.ValidationException
1515
importgroovy.xml.Namespace
16+
importorg.pih.warehouse.importer.CSVUtils
1617
importjava.sql.Timestamp
1718
importorg.apache.commons.lang.StringUtils
1819
importorg.hibernate.criterion.CriteriaSpecification
@@ -627,7 +628,6 @@ class ProductService {
627628

628629
}
629630

630-
631631
/**
632632
* Import products from csv
633633
*
@@ -671,35 +671,36 @@ class ProductService {
671671
rowCount++
672672
println"Processing line:"+ tokens
673673
def productId= tokens[0]
674-
def productCode= tokens[1]
675-
def productTypeName= tokens[2]
676-
def productName= tokens[3]
677-
def productFamilyName= tokens[4]
678-
def categoryName= tokens[5]
679-
def glAccountCode= tokens[6]
680-
def description= tokens[7]
681-
def unitOfMeasure= tokens[8]
682-
def productTags= tokens[9]?.split(",")
674+
def active=CSVUtils.parseCsvBooleanField(tokens[1], rowCount,true)
675+
def productCode= tokens[2]
676+
def productTypeName= tokens[3]
677+
def productName= tokens[4]
678+
def productFamilyName= tokens[5]
679+
def categoryName= tokens[6]
680+
def glAccountCode= tokens[7]
681+
def description= tokens[8]
682+
def unitOfMeasure= tokens[9]
683+
def productTags= tokens[10]?.split(",")
683684
def pricePerUnit
684685
try {
685-
pricePerUnit= tokens[10]?Float.valueOf(tokens[10]):null
686+
pricePerUnit= tokens[11]?Float.valueOf(tokens[11]):null
686687
}catch (NumberFormatException e) {
687-
thrownewRuntimeException("Unit price for product '${productCode}' at row${rowCount} must be a valid decimal (value = '${tokens[9]}')", e)
688+
thrownewRuntimeException("Unit price for product '${productCode}' at row${rowCount} must be a valid decimal (value = '${tokens[10]}')", e)
688689
}
689-
def lotAndExpiryControl=Boolean.valueOf(tokens[11])
690-
def coldChain=Boolean.valueOf(tokens[12])
691-
def controlledSubstance=Boolean.valueOf(tokens[13])
692-
def hazardousMaterial=Boolean.valueOf(tokens[14])
693-
def reconditioned=Boolean.valueOf(tokens[15])
694-
def manufacturer= tokens[16]
695-
def brandName= tokens[17]
696-
def manufacturerCode= tokens[18]
697-
def manufacturerName= tokens[19]
698-
def vendor= tokens[20]
699-
def vendorCode= tokens[21]
700-
def vendorName= tokens[22]
701-
def upc= tokens[23]
702-
def ndc= tokens[24]
690+
def lotAndExpiryControl=Boolean.valueOf(tokens[12])
691+
def coldChain=Boolean.valueOf(tokens[13])
692+
def controlledSubstance=Boolean.valueOf(tokens[14])
693+
def hazardousMaterial=Boolean.valueOf(tokens[15])
694+
def reconditioned=Boolean.valueOf(tokens[16])
695+
def manufacturer= tokens[17]
696+
def brandName= tokens[18]
697+
def manufacturerCode= tokens[19]
698+
def manufacturerName= tokens[20]
699+
def vendor= tokens[21]
700+
def vendorCode= tokens[22]
701+
def vendorName= tokens[23]
702+
def upc= tokens[24]
703+
def ndc= tokens[25]
703704

704705
if (!productName) {
705706
thrownewRuntimeException("Product name cannot be empty at row"+ rowCount)
@@ -734,6 +735,7 @@ class ProductService {
734735
// If the identifier is incorrect/missing we should display the ID of the product found using the product code instead of the missing/incorrect product identifier
735736
def productProperties= [
736737
id : product?.id?: productId,
738+
active : active,
737739
name : productName,
738740
productType : productType,
739741
productFamily : productFamily,
@@ -882,6 +884,7 @@ class ProductService {
882884
// FIXME make relation to Constants.EXPORT_PRODUCT_COLUMNS explicit
883885
def row= [
884886
Id : product?.id,
887+
Active : product.active?:Boolean.TRUE,
885888
ProductCode : product.productCode?:'',
886889
ProductType : product.productType?.name?:'',
887890
Name : product.name,

‎grails-app/views/product/importAsCsv.gsp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@
133133
<spanclass="modified">${warehouse.message(code:'default.new.label')}</span>
134134
</g:else>
135135
</td>
136+
<tdclass="${productProperties?.active!=existingProduct?.active?'modified':''}">
137+
<spantitle="${existingProduct?.active}">${productProperties?.active}</span>
138+
</td>
136139
<tdclass="${productProperties?.productCode!=existingProduct?.productCode?'modified':''}">
137140
<spantitle="${existingProduct?.productCode}">${productProperties?.productCode}</span>
138141
</td>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp