snipe-it/sample_csvs/MOCK_CONSUMABLES.csv
Daniel Meltzer 44683c784f Importer: Add License Importer and refactor (#3143)
* Major code simplification of the importers.

Move towards using Model::fill and Model::update rather than reinventing
the wheel.  This makes the updating/creating logic a lot clearer, and
allows for the deletion of a lot of code.  Also allows for supporting of
more fields in the future really easily.

* Cleanup constructors and use setters instead.

* Set the LC_MONETARY locale, and use it to strip currency symbols in Helper::parseFloat()

* Move licenseseat creation/deletion logic into an event handler on the model rather than the controller.

* Move the logging of parsed values to array_smart_fetch rather than writing it out everywhere

* Move to storing dates as carbon rather than strings.  Allows for the parsing of more arbitrary strings from the importer

* Add a license importer with support for checking out to users or assets.

* Make a directory for sample/mock import csvs and populate it

* Adjust how we store/retrieve dates to fix some issues the tests found.
2017-01-10 16:19:18 -08:00

7.5 KiB

1Item NamePurchase DatePurchase CostLocationCompanyOrder NumberCategoryRequestableQuantity
2eget01/03/201185.91mauris blandit mattis.LycosT295T06VTriamterene/HydrochlorothiazideNo322
3Morbi10/24/201687.42iaculisLavasoftW787T62QRanitidine HCl1374
4arcu.09/22/200748.34ornareGoogleN961E50AAmoxicillinFalse252
5nec08/16/20098.71lectusApple SystemsX624N14CLantus Solostar130
6Nam03/30/201724.07a,MacromediaN618A20SHydrocodone/APAPTrue551
7Nullam12/16/200373.23Donec est mauris,YahooB386I67LFluticasone PropionateNo395
8erat08/03/201017.49ProinBorlandG606H92IAmlodipine Besylate1297
9purus10/12/200463.52tellus justo sitChamiR660Z45OOmeprazole (Rx)Yes557
10dignissim11/10/201077.94nibh vulputate maurisLavasoftG230Z67XRisperidone147
11Nam01/25/201564.33taciti sociosqu adMicrosoftB613L84CSuboxoneNo310
12Nunc04/13/201781.02nec orci.BorlandO367N55NFluoxetine HClNo404
13Phasellus12/23/200570.67quis, tristique ac,BorlandK941C02TAlendronate Sodium0590
14Nulla07/21/201799.04augue malesuada malesuada.LycosD663L90HAllopurinolNo48
15at10/31/200758.42dolor sit amet,LavasoftY229E62ISimvastatinNo181
16Sed04/14/201148.86lectus convallis est,CakewalkT666E70KFluconazoleTrue169
17quis01/08/201455.64varius orci,LycosT767G07UAdvair DiskusFalse264
18viverra.01/07/201393.48cursus et, magna.SibeliusT276L44HLoestrin 24 FeNo293
19Sed03/20/200864.75arcu. SedCakewalkA933E55VPantoprazole SodiumNo407
20iaculis07/17/201556.74necBorlandN568F73CVenlafaxine HCl ERNo115
21leo.12/09/201296.88AeneanAltavistaH283Z42UCephalexinTrue208
22leo.04/24/200740.87tincidunt adipiscing. MaurisLycosT054Q83ULyrica0486
23pede.09/29/201019.64nec enim. NuncChamiL842O70ASimvastatinYes214
24massa05/18/201518.43nisi magna sedAdobeV029Q52KMeloxicam0131
25urna10/22/20147.41acSibeliusZ708U15XFlovent HFAYes15
26sapien03/23/201750.94penatibus etGoogleD258T89ZZolpidem TartrateTrue48
27non05/14/200571.71dui. FusceBorlandC021V01RAmphetamine SaltsTrue593
28et,10/18/201494.56natoque penatibus etLavasoftL351F80JGianvi1305
29pede02/18/200410.04felisYahooD516U60JPravastatin Sodium1302
30lobortis06/08/201131.17luctus,YahooD088E82HAzithromycinYes380
31placerat06/19/20055.38egetAdobeV472U75GNexium0-2
32leo10/03/201417.00justoLycosF944A58VIbuprofen (Rx)True294
33dictum11/24/201592.11tellus faucibusApple SystemsU938K61DOxycontinYes368
34bibendum.05/01/201022.45elit erat vitaeLavasoftZ326Q13RTramadol HClYes12
35facilisis,01/02/201185.42purusFinaleZ475L99MAlprazolamTrue359
36bibendum08/20/200944.68et pede. NuncGoogleN039W21LFluticasone PropionateTrue569
37eleifend03/17/200622.92velit. CrasLavasoftH339Z61TDoxycycline HyclateYes219
38rhoncus.03/17/200982.52feugiat non, lobortisAltavistaR524N72AAtenolol0176
39a04/03/20164.35nuncSibeliusV055S56YSimvastatinYes326
40enim.05/15/201420.18lectus justoGoogleI747M47JAtenolol1101
41molestie06/19/201211.30sem ut cursusApple SystemsF888J26KAmoxicillinYes405
42dui.05/16/201072.42consectetuer euismodCakewalkU999A42HAtenololFalse253
43tortor.08/02/201738.51ultrices iaculis odio.LavasoftJ465G08HTri-SprintecFalse577
44natoque04/15/201028.88magnisSibeliusN813P74XLipitor0562
45mollis05/07/201189.36DonecYahooO113X38KLexaproYes179
46ultrices.10/20/201373.45orci,LycosN587Y98NBenicar HCTNo185
47dui12/10/20110.57Mauris eu turpis.YahooS354F65PLevothyroxine SodiumNo78
48sagittis.04/06/201438.55elementum sem, vitaeGoogleR931X11BLoestrin 24 FeYes386
49dui,10/08/201052.52natoque penatibusAdobeJ615B52IClonazepam0563
50eros06/25/201545.90aliquam, enimMicrosoftS216N79DAmoxicillinTrue371
51et,05/16/20084.42nulla. In tinciduntAdobeZ906A47ASulfamethoxazole/TrimethoprimNo507
52est12/14/200416.79ametYahooP540P32ZDoxycycline HyclateTrue188
53montes,02/23/200852.98anteLavasoftC140R27GLisinoprilTrue401
54mollis07/09/200483.26Curabitur dictum. PhasellusCakewalkU620A61ZGlipizideNo278
55dolor.07/01/200450.94non, vestibulumLavasoftF625L82ESingulairNo475
56aliquet03/18/201456.23eratAltavistaL193Q72SClonazepamNo3
57nonummy09/13/200489.86enim.Apple SystemsU466F15UAtenololNo218
58natoque11/09/201572.14ridiculusAltavistaU295O53MCyclobenzaprin HClNo50
59tincidunt01/05/201184.90CrasCakewalkC373S25YParoxetine HCl0104
60tristique03/04/201064.59ipsum leo elementumMacromediaU140F94PAtenololFalse486
61eleifend.07/11/201045.06a, arcu. SedMacromediaG544Z82LZyprexa1100
62sem04/18/200844.81magna, malesuada vel,ChamiG143Q64LLorazepamNo440
63facilisi.06/13/200565.36ut, molestie in,GoogleN391E28JJanuviaFalse536
64arcu.09/24/201221.27parturient montes, nasceturFinaleZ720K67HFurosemideFalse308
65hendrerit01/26/201327.11eget varius ultrices,BorlandP865K75OMetformin HClFalse590
66Aliquam03/18/201064.99ridiculusBorlandK003G26GIbuprofen (Rx)0412
67eu08/27/201699.62Sed eu eros.MicrosoftH049R07DAtenololFalse498
68Morbi02/13/200830.86Sed nulla ante,AltavistaU852E06GFluticasone PropionateYes243
69malesuada08/17/201058.50tellus. PhasellusSibeliusT695G73PIbuprofen (Rx)Yes591
70ut,11/16/200646.64Sed molestie.MicrosoftT589M93DGianviTrue-5
71odio.12/09/201151.19montes, nascetur ridiculusChamiJ311Q19LGabapentinTrue517
72tortor.03/21/20177.11Morbi nequeFinaleW293Z75XLoestrin 24 FeYes242
73penatibus12/02/201581.51ipsum ac miBorlandU565B49HLoestrin 24 FeFalse220
74et,10/11/201356.41ut nisi aGoogleG623M74QTriamterene/HydrochlorothiazideTrue98
75ut,11/17/200774.85consequat purus.SibeliusQ247W03UTramadol HClYes484
76luctus09/30/201623.87euismodLavasoftT838L77WLisinoprilYes295
77gravida12/04/201080.12a neque.SibeliusU542S63OVytorin0188
78hymenaeos.01/16/201513.19In scelerisque scelerisqueSibeliusV375P80BZyprexaFalse255
79mi06/07/201017.75libero. ProinGoogleI728A71WAPAP/CodeineFalse435
80a,12/19/200612.35montes,LavasoftX885A67NMetformin HClTrue333
81ornare09/09/201534.13tacitiLavasoftQ602X92GLyricaYes447
82tellus,09/05/200792.17lorem,MicrosoftD008R07SVyvanse0256
83eget07/10/20085.71a odio semperAltavistaL996D22JTriamcinolone Acetonide189
84sodales01/26/201767.43at,MicrosoftB922B33BGlipizideFalse406
85amet,09/19/20115.34Cum sociis natoqueYahooC735B01GAmoxicillinNo85
86tempus02/14/201719.18felisMacromediaP379N42SSimvastatinFalse427
87laoreet06/25/201773.61SedApple SystemsN838F62BAlendronate SodiumNo405
88laoreet03/28/201540.48fames acCakewalkA503X28XIbuprofen (Rx)0430
89sit09/08/201341.23aliquet vel,SibeliusF381B10BNexiumNo359
90Aenean06/10/201097.61massaAltavistaX179G33KDoxycycline Hyclate1136
91non10/13/201346.02DuisMicrosoftF567P51AMetformin HCl1104
92Curabitur02/10/201649.59et magnisBorlandA902B81XDiovanNo270
93risus06/23/20146.22eu,Apple SystemsJ458L03XCrestor1577
94sem04/29/200636.75orci luctusApple SystemsI390X10DLisinoprilFalse131
95eu,08/06/201396.39diam dictum sapien.MicrosoftP937M90JLisinopril/HydrochlorothiazideYes229
96ultricies01/13/201318.64auctorMicrosoftQ793S72YAmphetamine Salts0153
97et09/04/200530.87sagittis placerat. CrasMicrosoftS427Q43EAlprazolamFalse571
98sit02/26/200680.53non justo.FinaleY646A59WOmeprazole (Rx)True193
99eget01/10/201471.57dolorBorlandV101B17WSertraline HClNo103
100a,06/02/201644.56nascetur ridiculusLycosO796A98JAlprazolam1505
101ante,12/20/201346.04eleifendLycosK375B97MPlavix0296