//
//  BIAbstractSlipSubcard.h
//  BIViews
//
//  Created by Eric Hochmeister on 21/04/05.
//  Copyright 2005 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <MCApplication/MCNibLoadingView.h>

@interface BIAbstractSlipSubcard : MCNibLoadingView {

	NSArray* _slipTypes;
	id _slip;
    NSArray* taxes;
	NSArray* _sortedUsers;
	
	IBOutlet NSObjectController*  slipController;
    
    IBOutlet NSArrayController* taxesController;
	
	IBOutlet NSNumberFormatter *currencyFormatter;
	
	BOOL isBeingCreated;
}

- (NSArray *)slipTypes;
- (void)setSlipTypes:(NSArray *)aSlipTypes;
- (id)slip;
- (void)setSlip:(id)aSlip;

- (NSArray*)taxes;
- (void)setTaxes:(NSArray*)theTaxes;
- (void)setupTaxes;

- (BOOL)isBeingCreated;
- (void)setIsBeingCreated:(BOOL)flag;


- (void)setupWithSlip:(id)aSlip slipTypes:(NSArray*)theTypes;
- (void)establishCurrencyFormatFrom:(NSNumberFormatter *)aFmt;
- (IBAction)changeSlipType:(id)sender;
- (IBAction)changeOwner:(id)sender;

- (NSArray*)slipCategories;

	// [aNotif object] is the category which was added
- (void)handleCategoryAddedNotification:(NSNotification*)aNotif;

	// [aNotif object] is the categories which were deleted
- (void)handleCategoryDeletedNotification:(NSNotification*)aNotif;

- (NSArray*)sortedUsers;
- (void)setSortedUsers:(NSArray *)array;

- (BOOL)isEditable;
- (void)setIsEditable:(BOOL)aFlag;

@end
