mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 07:57:33 -05:00 
			
		
		
		
	Don't show payment options if invoice isn't sent
This commit is contained in:
		
							parent
							
								
									f275d1a295
								
							
						
					
					
						commit
						1ee1beb070
					
				@ -123,7 +123,7 @@ class InvoiceDatatable extends EntityDatatable
 | 
				
			|||||||
                    return "javascript:submitForm_{$entityType}('markPaid', {$model->public_id})";
 | 
					                    return "javascript:submitForm_{$entityType}('markPaid', {$model->public_id})";
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                function ($model) {
 | 
					                function ($model) {
 | 
				
			||||||
                    return $model->balance > 0 && Auth::user()->can('editByOwner', [ENTITY_INVOICE, $model->user_id]);
 | 
					                    return $model->is_public && $model->balance > 0 && Auth::user()->can('editByOwner', [ENTITY_INVOICE, $model->user_id]);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
            [
 | 
					            [
 | 
				
			||||||
@ -132,7 +132,7 @@ class InvoiceDatatable extends EntityDatatable
 | 
				
			|||||||
                    return URL::to("payments/create/{$model->client_public_id}/{$model->public_id}");
 | 
					                    return URL::to("payments/create/{$model->client_public_id}/{$model->public_id}");
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                function ($model) use ($entityType) {
 | 
					                function ($model) use ($entityType) {
 | 
				
			||||||
                    return $entityType == ENTITY_INVOICE && $model->balance > 0 && Auth::user()->can('create', ENTITY_PAYMENT);
 | 
					                    return $model->is_public && $entityType == ENTITY_INVOICE && $model->balance > 0 && Auth::user()->can('create', ENTITY_PAYMENT);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
            [
 | 
					            [
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user