Preliminary payments and fees in one table.
This commit is contained in:
		
							parent
							
								
									a6f307d230
								
							
						
					
					
						commit
						34f54b2bb0
					
				
					 3 changed files with 22 additions and 6 deletions
				
			
		|  | @ -269,10 +269,7 @@ | |||
|    (print "Current month: " (cal-month->string (*current-month*))) | ||||
|    (newline) | ||||
|    (if mr | ||||
|        (let () | ||||
| 	 (print-member-table mr) | ||||
| 	 (brmember-balance-history mr) | ||||
| 	 ) | ||||
|        (print-member-table mr) | ||||
|        (print-members-base-table MB)) | ||||
|    (newline)) | ||||
|   ((print-stats) | ||||
|  | @ -320,7 +317,9 @@ | |||
| 		(loop (cdr mrs)))))))) | ||||
|   ((fees) | ||||
|    (newline) | ||||
|    (print-members-fees-table MB (-show-destroyed-))) | ||||
|    (if mr | ||||
|        (print-member-balances-table mr) | ||||
|        (print-members-fees-table MB (-show-destroyed-)))) | ||||
|   ((repl) | ||||
|    (repl)) | ||||
|   ((genweb) | ||||
|  |  | |||
|  | @ -282,7 +282,7 @@ | |||
| 		(bal 0)) | ||||
|        (if (null? trs) | ||||
| 	   (let ((res (reverse rbls))) | ||||
| 	     (print res) | ||||
| 	     ;;(print res) | ||||
| 	     res) | ||||
| 	   (let* ((amt (list-ref (car trs) 4)) | ||||
| 		  (nbal (+ bal amt))) | ||||
|  |  | |||
|  | @ -39,6 +39,7 @@ | |||
|   print-members-fees-table | ||||
|   unpaired-table | ||||
|   print-unpaired-table | ||||
|   print-member-balances-table | ||||
|   ) | ||||
| 
 | ||||
|  (import scheme | ||||
|  | @ -543,4 +544,20 @@ | |||
|      (unpaired-table mb) | ||||
|      "\n"))) | ||||
| 
 | ||||
|  ;; Prints fees/payments/balances of one member | ||||
|  (define (print-member-balances-table mr) | ||||
|    (let ((data (map (lambda (r) | ||||
| 		      (list (cal-day->string (cadr r)) | ||||
| 			    (list-ref r 4) | ||||
| 			    (format "\t~A" (exact->inexact (list-ref r 5))) | ||||
| 			    (format "\t~A" (exact->inexact (car r))) | ||||
| 			    )) | ||||
| 		    (brmember-balance-history mr)))) | ||||
|      (print-table | ||||
|       #:border '(((#:bottom #:right light) ... (#:bottom light)) | ||||
| 		 ((#:right light) ... none) | ||||
| 		 ...) | ||||
|       (cons '("\tDate\t" "\tComment\t" "\tAmount\t" "\tBalance\t") | ||||
| 	    data)))) | ||||
| 
 | ||||
|  ) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue