diff options
Diffstat (limited to 'contrib/lisp/org-invoice.el')
-rw-r--r-- | contrib/lisp/org-invoice.el | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/lisp/org-invoice.el b/contrib/lisp/org-invoice.el index c1340a7..4c83d2e 100644 --- a/contrib/lisp/org-invoice.el +++ b/contrib/lisp/org-invoice.el @@ -176,8 +176,8 @@ looks like tree2, where the level is 2." "Return a list where the car is the min level, and the cdr the max." (let ((max 0) min level) (dolist (info ls) - (when (cdr (assoc 'date info)) - (setq level (cdr (assoc 'level info))) + (when (cdr (assq 'date info)) + (setq level (cdr (assq 'level info))) (when (or (not min) (< level min)) (setq min level)) (when (> level max) (setq max level)))) (cons (or min 0) max))) @@ -186,11 +186,11 @@ looks like tree2, where the level is 2." "Reorganize the given list by dates." (let ((min-max (org-invoice-level-min-max ls)) new) (dolist (info ls) - (let* ((date (cdr (assoc 'date info))) - (work (cdr (assoc 'work info))) - (price (cdr (assoc 'price info))) - (long-date (cdr (assoc 'long-date info))) - (level (cdr (assoc 'level info))) + (let* ((date (cdr (assq 'date info))) + (work (cdr (assq 'work info))) + (price (cdr (assq 'price info))) + (long-date (cdr (assq 'long-date info))) + (level (cdr (assq 'level info))) (bucket (cdr (assoc date new)))) (if (and (/= (car min-max) (cdr min-max)) (= (car min-max) level) @@ -208,19 +208,19 @@ looks like tree2, where the level is 2." (push (cons date bucket) new) (setq bucket (cdr (assoc date new)))) (when (and date bucket) - (setcdr (assoc 'total-work (car bucket)) - (+ work (cdr (assoc 'total-work (car bucket))))) - (setcdr (assoc 'price (car bucket)) - (+ price (cdr (assoc 'price (car bucket))))) + (setcdr (assq 'total-work (car bucket)) + (+ work (cdr (assq 'total-work (car bucket))))) + (setcdr (assq 'price (car bucket)) + (+ price (cdr (assq 'price (car bucket))))) (nconc bucket (list info)))))) (nreverse new))) (defun org-invoice-info-to-table (info) "Create a single org table row from the given info alist." - (let ((title (cdr (assoc 'title info))) - (total (cdr (assoc 'total-work info))) - (work (cdr (assoc 'work info))) - (price (cdr (assoc 'price info))) + (let ((title (cdr (assq 'title info))) + (total (cdr (assq 'total-work info))) + (work (cdr (assq 'work info))) + (price (cdr (assq 'price info))) (with-price (plist-get org-invoice-table-params :price))) (unless total (setq |