File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/app/fyle/add-edit-expense Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -3668,8 +3668,21 @@ export class AddEditExpensePage implements OnInit {
36683668 return null ;
36693669 }
36703670
3671- getBillable ( ) : boolean {
3672- return this . getFormValues ( ) ?. billable ;
3671+ /**
3672+ * If billable checkbox is visible (project selected + org has billable option),
3673+ *
3674+ * @returns the actual checkbox value (true/false),
3675+ * otherwise return billableValue `undefined` because billable checkbox is hidden
3676+ */
3677+ getBillable ( ) : boolean | undefined {
3678+ const formValues = this . getFormValues ( ) ;
3679+ const billableValue = formValues ?. billable ;
3680+
3681+ if ( formValues ?. project && this . showBillable ) {
3682+ return billableValue === true ;
3683+ }
3684+
3685+ return billableValue ;
36733686 }
36743687
36753688 getSkipRemibursement ( ) : boolean {
You can’t perform that action at this time.
0 commit comments