adding new vendors
This commit is contained in:
25
resources/payout-list.csv
Normal file
25
resources/payout-list.csv
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
[:vendor/name],[:vendor/print-as],[:vendor/default-expense-account],[:vendor/address],[:vendor/address :address/street1],[:vendor/address :address/street2],[:vendor/address :address/city],[:vendor/address :address/state],[:vendor/address :address/zip],[:vendor/primary-contact :contact/name],[:vendor/primary-contact :contact/email],[:vendor/primary-contact :contact/phone],[:vendor/secondary-contact :contact/name],[:vendor/secondary-contact :contact/email],[:vendor/secondary-contact :contact/phone],[:vendor/invoice-reminder-schedule]
|
||||||
|
PAY OUTS - CB 5110 Food Cost,,5110,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 5910 Paperware Cost,,5910,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7210 Flowers and ST Decorations,,7210,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7315 Freight and Fuel Charges,,7315,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7315 Freight and Fuel Charges,,7315,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7320 Kitchen Supplies,,7320,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7410 Cleaning Supplies,,7410,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7450 Building Cleaning & Maintenance,,7450,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7460 Repairs to Equipment,,7460,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7461 Contract Labor,,7461,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - CB 7510 Office Supplies,,7510,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - HQ 9160 Meals and Entertainment - HQ,,9160,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - HQ 9180 Food Research - HQ,,9180,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - meals,,9160,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 5110 Food Cost,,5110,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 5910 Paperware Cost,,5910,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 7210 Flowers and ST Decorations,,7210,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 7315 Freight and Fuel Charges,,7315,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 7320 Kitchen Supplies,,7320,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 7410 Cleaning Supplies,,7410,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 7450 Building Cleaning & Maintenance,,7450,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 7460 Repairs to Equipment,,7460,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 7460 Contract Labor,,7461,,,,,,,,,,,,,
|
||||||
|
PAY OUTS - WG 7510 Office Supplies,,7510,,,,,,,,,,,,,
|
||||||
|
132
resources/vendor-list.csv
Normal file
132
resources/vendor-list.csv
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
[:vendor/name],[:vendor/print-as],[:vendor/default-expense-account],[:vendor/address],[:vendor/address :address/street1],[:vendor/address :address/street2],[:vendor/address :address/city],[:vendor/address :address/state],[:vendor/address :address/zip],[:vendor/primary-contact :contact/name],[:vendor/primary-contact :contact/email],[:vendor/primary-contact :contact/phone],[:vendor/secondary-contact :contact/name],[:vendor/secondary-contact :contact/email],[:vendor/secondary-contact :contact/phone],[:vendor/invoice-reminder-schedule]
|
||||||
|
Aaron mendoza guadarama,,9220,,,,,,,,,,,,,
|
||||||
|
ABC Insurance Services ,,8511,,3401 Pacific Blvd,,San Mateo,CA,94403,,,,,,,
|
||||||
|
"ADP, INC",,9315,,"504 CLINTON CENTER DR, STE 4400",,CLINTON,MS,39056,,,,,,,
|
||||||
|
"ANAGO FRANCHISING, INC",,7415,,"1460 KOLL CIRCLE, SUITE B",,SAN JOSE,CA,95112,,,,,,,
|
||||||
|
Andy Younan,,A3304,,,,,,,,,,,,,
|
||||||
|
ARC LOCKSMITH,,7440,,,,,,,,,,,,,
|
||||||
|
Bakemart,,5110,,,,,,,,,,,,,
|
||||||
|
Bank of America - Los Angeles,Bank of America,A1298,,P O BOX 301200,,LOS ANGELES,CA,90030-1200,,,,,,,
|
||||||
|
Bay lighting supply,,8310,,979 el camino real,,Santa Clara,CA,95050,,,,,,,
|
||||||
|
Beaucanon,,5510,,1006 Monticello Road,,Napa,CA,94558,,,,,,,
|
||||||
|
Bellaginevera,,5110,,,,,,,,,,,,,
|
||||||
|
Benedetto Di Giallorenzo,,7440,,,,,,,,,,,,,
|
||||||
|
Big Basin Cafe,,5220,,14471 Big Basin Way,,Saratoga,CA,95070,,,,,,,
|
||||||
|
Big Four Restaurant,,9160,,,,,,,,,,,,,
|
||||||
|
BLUE SHIELD OF CA,,6040,,,,LOS ANGELES,CA,90074-5331,,,,,,,
|
||||||
|
Brendon Dias,,9220,,P. O. Box 4258,,Santa Cruz,CA,95063,,,,,,,
|
||||||
|
BURR PLUMBING,,7440,,1645 ALMADEN RD,,SAN JOSE,CA,95125,,,,,,,
|
||||||
|
CAPITAL ONE,,A1298,,P O BOX 60599 ,,CITY OF INDUSTRY,CA,91716-0599,,,,,,,
|
||||||
|
Central Storage,,9383,,,,,,,,,,,,,
|
||||||
|
Champion Plumbing,,7440,,,,San Jose,Ca,,,,,,,,
|
||||||
|
CHASE,,A1298,,P O BOX 94014,,PALATINE,IL,60094-4014,,,,,,,
|
||||||
|
City of Saratoga,,8130,,,,,,,,,,,,,
|
||||||
|
Clark Pest Control,,7450,,PO BOX 1480,,Lodi,CA,95241,,,,,,,
|
||||||
|
Classic Mix - Galloway Company,,5110,,,,,,,,,,,,,
|
||||||
|
Clyde Zaya,,A3301,,,,,,,,,,,,,
|
||||||
|
COCA-COLA,,5210,,,,LOS ANGELES,CA,90074-3158,,,,,,,
|
||||||
|
COLD Brew,,7420,,,,,,,,,,,,,
|
||||||
|
COLD CRAFT INC,,7460,,P.O. BOX 32024,,LOS GATOS,CA,95032-0104,,,,,,,
|
||||||
|
COSTCO WHOLESALE,,9190,,PO BOX 34783,,SEATTLE,WA,98124-1783,,,,,,,
|
||||||
|
Creative drinks inc.,,7460,,p.o. box 842,,Los Gatos,CA,95031-0842,,,,,,,
|
||||||
|
D.G.HEATING & AIR CONDITIONING,,7460,,,,,,,,,,,,,
|
||||||
|
DANNY APPLIANCE,,7460,,,,,,,,,,,,,
|
||||||
|
David Correa,,A1280,,P.O. Box 12084,,Pleasanton,CA,94588,,,,,,,
|
||||||
|
DMV,,9170,,PO BOX 942897,,SACRAMENTO,CA,94297-0897,,,,,,,
|
||||||
|
E M Fire Protection,,7450,,1120 Eaton Ave #5,,San Carlos,Ca,94070,,,,,,,
|
||||||
|
EDGAR MENDOZA,,7461,,,,,,,,,,,,,
|
||||||
|
EDWARD P. MATHEWSON,,9310,,"152 NORTH THIRD ST, STE 800",,SAN JOSE,CA,95112,,,,,,,
|
||||||
|
Enter Design & Lights,,7440,,1167 Chess Dr Suite # B,,Foster City,CA,94404,,,,,,,
|
||||||
|
Felix Amerian,,7244,,,,,,,,,,,,,
|
||||||
|
FIRESHIELD,,7460,,7450 DOWDY STREET,,GILROY,CA,95020,,,,,,,
|
||||||
|
Friuli italian wine imports llc,,4510,,3130 rubino dr #105,,San Jose,CA,95125,,,,,,,
|
||||||
|
"G & T TECH, Inc",,7460,,P O BOX 5762,,REDWOOD CITY,CA,94063,,,,,,,
|
||||||
|
Givmar Precision Machining,,7460,,1904 Colony Street,,Mountain View,CA,94043,,,,,,,
|
||||||
|
Greenback,,8210,,,,,,,,,,,,,
|
||||||
|
Grim fire protection,,7440,,p.o.box 1118,,Boulder Creek,Ca,95006,,,,,,,
|
||||||
|
hacienda produce company,,5120,,p.o. box 8443,,San Jose,Ca,95155,,,,,,,
|
||||||
|
HD ELECTRIC,,7440,,"1090 LINCOLN AVE, SUITE 10",,SAN JOSE,CA,95125,,,,,,,
|
||||||
|
HEALTH SMART FOODS,,5110,,,,,,,,,,,,,
|
||||||
|
Heart String Music,,7244,,2273 Old Milddlefield Way,,Mountian View,CA,94043,,,,,,,
|
||||||
|
Hugo Wainginger,,7246,,,,,,,,,,,,,
|
||||||
|
ICE CREAM SOLUTIONS,,5110,,P O BOX 33816,,GRANADA HILLSE,CA,9139,,,,,,,
|
||||||
|
Impact Paper & Ink LTD,,7510,,1590 Gilbreth Rd,,Burlingame,CA,94010,,,,,,,
|
||||||
|
IRS,,9710,,P. O. Box 37900,,Heartford,CT,6176,,,,,,,
|
||||||
|
J Drains,,A1520,,,,,,,,,,,,,
|
||||||
|
j&b,,7460,,411 lewis rd-425,,San Jose,CA,95111,,,,,,,
|
||||||
|
J&T Handyman,,7440,,100 PANORAMA WAY,,LOS GATOS,CA,,,,,,,,
|
||||||
|
JCA ARCHITECT & DESIGN,,7440,,1028 LINCOLN AVE,,SAN JOSE,CA,95125,,,,,,,
|
||||||
|
Jeff Hickey,,7440,,,,,,,,,,,,,
|
||||||
|
Jeff Mullen,,A3301,,,,,,,,,,,,,
|
||||||
|
JESSE SALECDA,,5110,,,,,,,,,,,,,
|
||||||
|
Kelex Security,,8351,,2959 s. winchester BLVD ste 100,,Campbell,CA,95008,,,,,,,
|
||||||
|
lang vo,,A1240,,,,,,,,,,,,,
|
||||||
|
Le Boulanger,,5140,,305 NORTH MATHILDA AVE.,,SUNNYVALE,CA,94085,,,,,,,
|
||||||
|
Leslie Kurnick,,A1260,,1667 Page St.,,San Francisco,CA,94117,,,,,,,
|
||||||
|
LIMPIO CLEANING,,7415,,,,,,,,,,,,,
|
||||||
|
"M.E. Fox & Company, Inc",,5410,,P.O. Box 60000,,San Francisco,CA,94160,,,,,,,
|
||||||
|
Mahnaz Khazan,,8430,,15219 Sobey rd.,,Saratoga,CA,95070,,,,,,,
|
||||||
|
MARGUARD PAINTING,,7450,,P.O. BOX 8482,,SAN JOSE,CA,95155,,,,,,,
|
||||||
|
Marz Vodka,,5610,,2350 mission college blvd suite 1152,,Santa Clara,CA,95054,,,,,,,
|
||||||
|
"METHOD CONSTRUCTION, INC.",,7440,,PO BOX 2702,,GILROY,CA,95020-4446,,,,,,,
|
||||||
|
METRO PUBLISHING INC,,9110,,BOX 39000 ,,SAN FRANCISCO,CA,94139,,,,,,,
|
||||||
|
Midwest,,8511,,PO BOX 9560,,SPRINGFIELD,IL,62791-9560,,,,,,,
|
||||||
|
Mike Windows,,7460,,4501 SNELL AVE #1202,,SAN JOSE,CA,95136,,,,,,,
|
||||||
|
MOOD MUZAK LLC,,7246,,P O BOX 71070,,CHARLOTTE,NC,28272-1070,,,,,,,
|
||||||
|
"Mr. Freeze, Inc.",,5110,,186 Cleveland Ave,,San Jose,CA,95128,,,,,,,
|
||||||
|
Muscardini cellars llc,,4510,,9380 Sonoma Highway,,Kenwood,CA,95452,,,,,,,
|
||||||
|
Newport Fish Co.,,5114,,457 South Canal ST. So.,,San Francisco,CA,94080,,,,,,,
|
||||||
|
NISSAN MOTOR ACCEPTANCE CORP,,7310,,,,,,,,,,,,,
|
||||||
|
Office of Tourism,,9730,,PO Box 101711,,Pasadena,CA,91189,,,,,,,
|
||||||
|
Olsen's Pressure Washing,,7450,,,,,,,,,,,,,
|
||||||
|
Open table,,7250,,P.O. Box 8395,,Pasadena,CA,91109-8395,,,,,,,
|
||||||
|
P & R PAPER SUPPLY CO,,5910,,2000 University Ave. ,,Berkley,CA,92373,,,,,,,
|
||||||
|
PACIFIC HARVEST SEAFOOD - San Juan,,5114,,P.O. BOX 788,,SAN JUAN BAUTISTA ,CA,95045,,,,,,,
|
||||||
|
PACIFIC PRODUCE,,5120,,P. O. BOX 879,,SOUTH SAN FRANCISCO,CA,94080,,,,,,,
|
||||||
|
Pacific seafood - Boston,,5114,,po box 842757,,Boston,MA,02284-2757,,,,,,,
|
||||||
|
Paja Glen,,8210,,,,,,,,,,,,,
|
||||||
|
Palo Alto Foods,,5110,,,,,,,,,,,,,
|
||||||
|
PETTY ACCOUNT Groceries,,5110,,,,,,,,,,,,,
|
||||||
|
PETTY ACCOUNT Hardware,,7320,,,,,,,,,,,,,
|
||||||
|
Ridge vineyards,,4510,,p.o.box 742749,,los angeles,ca,95070,,,,,,,
|
||||||
|
Rimon,,8110,,,,,,,,,,,,,
|
||||||
|
ROBERT'S GARDENING,,7415,,949 S 11TH ST ,,SAN JOSE,CA,95112,,,,,,,
|
||||||
|
Rombauer Vineyards,,5510,,Department 33313 PO Box 39000,,San Francisco,CA,94139-3313,,,,,,,
|
||||||
|
ROYAL SATELITE,,7160,,,,,,,,,,,,,
|
||||||
|
Ruben sanchez,,A2110,,,,,,,,,,,,,
|
||||||
|
Ruchi Gowda,,5510,,3550 Marsh Manor Way,,San Jose ,CA,95121,,,,,,,
|
||||||
|
Ruzz0 scholl & murphy,,8120,,,,,,,,,,,,,
|
||||||
|
S & S BOOKKEEPING,,9315,,3160 DE LA CRUZ BLVD STE 226,,SANTA CLARA,CA,95054,,,,,,,
|
||||||
|
S.C.C D.T.A.C.,,9730,,,,,,,,,,,,,
|
||||||
|
SAFEGUARD BUSINESS SYS.,,7510,,PO BOX 88043 ,,CHICAGO,IL,60680-1043,,,,,,,
|
||||||
|
SAN JOSE GIANTS,,8210,,P.O. BOX 21727 ,,SAN JOSE,CA,95151,,,,,,,
|
||||||
|
Savannah Chanelle,,5510,,3600 Congress Spring Rd,,Saratoga,CA,95070,,,,,,,
|
||||||
|
SCC Tax Collector,,9730,,"70 West Hedding Street East Wing, 6th Floor ",,San Jose,CA,95110-1767,,,,,,,
|
||||||
|
SILICON VALLEY CARDIOLOGY,,6040,,"1950 UNIVERSITY AVE, #160",,E. PALO ALTO,CA,94303,,,,,,,
|
||||||
|
Silver mountian winery,,5510,,,,,,,,,,,,,
|
||||||
|
Silver oak cellars,,5510,,7370 Highway 128,,Healdsburg,CA,95448,,,,,,,
|
||||||
|
SJP SIGNS,,9110,,1752 JUNCTION AVE,,SAN JOSE,CA,95112,,,,,,,
|
||||||
|
"Skurnik Wines West, LLC",,4510,,P. O. Box 421,,Syosset,NY,11791-1315,,,,,,,
|
||||||
|
Smart plumbers&rooter,,7440,,,,,,,,,,,,,
|
||||||
|
SOFT SERVE PARTS,,7460,,3245 E. PATRICK SUITE A ,,LAS VEGAS,NV,89120,,,,,,,
|
||||||
|
SOOTER CONSULTING INC,,8110,,PO BOX 2301,,MORGAN HILL,CA,95038,,,,,,,
|
||||||
|
SOUTH BAY REFRIGERATION INC,,7460,,P O BOX 54323,,SAN JOSE,CA,95154,,,,,,,
|
||||||
|
"SOUTHWEST TRADERS, INC.",,5110,,,,,,,,,,,,,
|
||||||
|
ST. LUCY SCHOOL,,9150,,76 KENNEDY AVE,,CAMPBELL,CA,95008,,,,,,,
|
||||||
|
STATE FARM INSURANCE SUPPORT CENTER,,6040,,P O BOX 68001 ,,DALLAS,TX,75368-001,,,,,,,
|
||||||
|
SUNLAND CANDY WHOLESALE,,5110,,3232 N. FIGUEROA ST,,LOS ANGELES,CA,90065,,,,,,,
|
||||||
|
Supernova Spirits Inc.,,5610,,2350 Mission College Blvd suite 1152,,Santa Clara,CA,95054,,,,,,,
|
||||||
|
Surveillance Solutions,,8110,,15466 Los Gatos Bvld #109-256,,Los Gatos,CA,95032,,,,,,,
|
||||||
|
TACKTIX GRAPHIX ,,9110,,14938 CAMDEN AVE. #209 ,,SAN JOSE,CA,95124,,,,,,,
|
||||||
|
THE HARDFORD,,9382,,LOCKBOX 0234 PO 7247,,PHILADELPHIA,PA,19170-0234,,,,,,,
|
||||||
|
The Iceman,,7460,,530 Lawrence Expy # 425,,Sunnyvale,CA,94085,,,,,,,
|
||||||
|
TOBIASON AND ROOK BUILDERS ,,7440,,1161 GLENN AVE,,SAN JOSE,CA,95125,,,,,,,
|
||||||
|
Troung Gia LLC,,8210,,1966 Cape Hilda Place,,San Jose,CA,95133,,,,,,,
|
||||||
|
UNITED CONTRACT SERVICES,,7415,,"1161 RINGWOOD COURT, STE 170",,SAN JOSE,CA,95131,,,,,,,
|
||||||
|
VALLEY IMAGES,,7340,,1925 KYLE PARK CT.,,SAN JOSE,CA,95125,,,,,,,
|
||||||
|
VERIZON WIRELESS ,,9380,,P O BOX 660108,,DALLAS,TX,75266-0108,,,,,,,
|
||||||
|
WELLS FARGO FINANCIAL CARDS ,,A1298,,P O BOX 30358,,LOS ANGELES,CA,90030-0358,,,,,,,
|
||||||
|
WEST VALLEY COLLECTION,,8330,,PO BOX 60248,,LOS ANGELES,CA,90060-0248,,,,,,,
|
||||||
|
"West Valley Collection & Recycling, LLC",,7450,,1333 Old Oakland,,San Jose,CA,95112,,,,,,,
|
||||||
|
Western Freezers Specialty Equipment,,7460,,42285 Osgood Rd. Unit F,,Fremont,CA,94539,,,,,,,
|
||||||
|
Winchester printing,,9350,,2383 moorpark Ave.,,San Jose,CA,95128,,,,,,,
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
:auto-ap/add-import-status {:txes auto-ap.datomic.migrate.invoice-converter/add-import-status :requires [:auto-ap/add-default-location-2]}
|
:auto-ap/add-import-status {:txes auto-ap.datomic.migrate.invoice-converter/add-import-status :requires [:auto-ap/add-default-location-2]}
|
||||||
:auto-ap/add-import-status-existing-invoices {:txes-fn 'auto-ap.datomic.migrate.invoice-converter/add-import-status-existing-invoices :requires [:auto-ap/add-import-status]}
|
:auto-ap/add-import-status-existing-invoices {:txes-fn 'auto-ap.datomic.migrate.invoice-converter/add-import-status-existing-invoices :requires [:auto-ap/add-import-status]}
|
||||||
:auto-ap/fix-check-numbers {:txes-fn 'auto-ap.datomic.migrate.check-numbers/fix-check-numbers :requires [:auto-ap/add-import-status-existing-invoices]}
|
:auto-ap/fix-check-numbers {:txes-fn 'auto-ap.datomic.migrate.check-numbers/fix-check-numbers :requires [:auto-ap/add-import-status-existing-invoices]}
|
||||||
|
:auto-ap/add-new-vendors {:txes-fn 'auto-ap.datomic.migrate.add-new-vendors/add-new-vendors :requires [:auto-ap/fix-check-numbers]}
|
||||||
}]
|
}]
|
||||||
(println "Conforming database...")
|
(println "Conforming database...")
|
||||||
(println (c/ensure-conforms conn norms-map))
|
(println (c/ensure-conforms conn norms-map))
|
||||||
|
|||||||
27
src/clj/auto_ap/datomic/migrate/add_new_vendors.clj
Normal file
27
src/clj/auto_ap/datomic/migrate/add_new_vendors.clj
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
(ns auto-ap.datomic.migrate.add-new-vendors
|
||||||
|
(:require [datomic.api :as d]
|
||||||
|
[auto-ap.datomic :refer [uri]]
|
||||||
|
[clojure.data.csv :as csv]
|
||||||
|
[clojure.java.io :as io]
|
||||||
|
[clojure.string :as str])
|
||||||
|
(:import [org.apache.commons.io.input BOMInputStream]))
|
||||||
|
|
||||||
|
(defn add-new-vendors [conn]
|
||||||
|
(let [[header & rows] (-> "vendor-list.csv" (io/resource) io/input-stream (BOMInputStream.) (io/reader) csv/read-csv)
|
||||||
|
headers (map read-string header)
|
||||||
|
new-vendors [(reduce
|
||||||
|
(fn [rows r]
|
||||||
|
(conj rows (reduce
|
||||||
|
(fn [r [header value]]
|
||||||
|
(condp = header
|
||||||
|
[:vendor/address] r
|
||||||
|
[:vendor/default-expense-account] (assoc-in r header (Integer/parseInt (str/replace value #"A" "")))
|
||||||
|
[:vendor/invoice-reminder-schedule] r
|
||||||
|
(assoc-in r header value)))
|
||||||
|
{}
|
||||||
|
(map vector headers r))))
|
||||||
|
[]
|
||||||
|
rows)]]
|
||||||
|
(println (ffirst new-vendors))
|
||||||
|
new-vendors
|
||||||
|
))
|
||||||
@@ -3,11 +3,17 @@
|
|||||||
[auto-ap.datomic :refer [uri]]))
|
[auto-ap.datomic :refer [uri]]))
|
||||||
|
|
||||||
(defn get-graphql [args]
|
(defn get-graphql [args]
|
||||||
|
(prn (->> (d/q '[:find (pull ?e [*])
|
||||||
|
:where [?e :vendor/name]]
|
||||||
|
(d/db (d/connect uri)))
|
||||||
|
(map first)
|
||||||
|
(take 5)))
|
||||||
|
|
||||||
(->> (d/q '[:find (pull ?e [*])
|
(->> (d/q '[:find (pull ?e [*])
|
||||||
:where [?e :vendor/name]]
|
:where [?e :vendor/name]]
|
||||||
(d/db (d/connect uri)))
|
(d/db (d/connect uri)))
|
||||||
(map first)
|
(map first)
|
||||||
|
|
||||||
#_(map (fn [c]
|
#_(map (fn [c]
|
||||||
(update c :client/bank-accounts
|
(update c :client/bank-accounts
|
||||||
(fn [bas]
|
(fn [bas]
|
||||||
|
|||||||
@@ -337,6 +337,7 @@
|
|||||||
9365 {:name "Office Maintenance - HQ" :parent 9300 :location "HQ" }
|
9365 {:name "Office Maintenance - HQ" :parent 9300 :location "HQ" }
|
||||||
9370 {:name "Utilities - HQ" :parent 9300 :location "HQ" }
|
9370 {:name "Utilities - HQ" :parent 9300 :location "HQ" }
|
||||||
9380 {:name "Telephone - HQ" :parent 9300 :location "HQ" }
|
9380 {:name "Telephone - HQ" :parent 9300 :location "HQ" }
|
||||||
|
9383 {:name "Storage - HQ" :parent 9380 :location "HQ" }
|
||||||
9500 {:name "HQ Interest and Bank Expenses" :parent nil :location "HQ" }
|
9500 {:name "HQ Interest and Bank Expenses" :parent nil :location "HQ" }
|
||||||
9510 {:name "Bank Fees - HQ" :parent 9500 :location "HQ" }
|
9510 {:name "Bank Fees - HQ" :parent 9500 :location "HQ" }
|
||||||
9520 {:name "NSF Fees - HQ" :parent 9500 :location "HQ" }
|
9520 {:name "NSF Fees - HQ" :parent 9500 :location "HQ" }
|
||||||
|
|||||||
@@ -54,6 +54,12 @@
|
|||||||
(fn [db]
|
(fn [db]
|
||||||
(vals (:vendors db))))
|
(vals (:vendors db))))
|
||||||
|
|
||||||
|
(re-frame/reg-sub
|
||||||
|
::sorted-vendors
|
||||||
|
:<- [::vendors]
|
||||||
|
(fn [vendors]
|
||||||
|
(sort-by :name vendors)))
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
::admin
|
::admin
|
||||||
(fn [db]
|
(fn [db]
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
(set (mapcat :in (::s/problems (s/explain-data spec v)))))
|
(set (mapcat :in (::s/problems (s/explain-data spec v)))))
|
||||||
|
|
||||||
(defn vendors-table []
|
(defn vendors-table []
|
||||||
(let [vendors (re-frame/subscribe [::subs/vendors])
|
(let [vendors (re-frame/subscribe [::subs/sorted-vendors])
|
||||||
editing-vendor (:editing @(re-frame/subscribe [::subs/admin]))]
|
editing-vendor (:editing @(re-frame/subscribe [::subs/admin]))]
|
||||||
|
|
||||||
[:table {:class "table", :style {:width "100%"}}
|
[:table {:class "table", :style {:width "100%"}}
|
||||||
|
|||||||
Reference in New Issue
Block a user