Skip to content

Commit 675060d

Browse files
committed
1 parent 5af15c0 commit 675060d

File tree

54 files changed

+520
-588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+520
-588
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ for run to production, follow this link : [wiki page (install to run)](https://
4646

4747
-----------------
4848

49-
:building_construction: Project Feature, follow this link : [wiki page](https://github.com/SMEWebify/WebErpMesv2/wiki/Features)
50-
51-
-----------------
5249

5350
![image](https://github.com/SMEWebify/WebErpMesv2/assets/75578469/bcc022c1-465e-44fb-a7ce-011f9096eba7)
5451

app/Http/Controllers/Methods/ServicesController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ public function __construct(SelectDataService $SelectDataService)
2525
public function index()
2626
{
2727
$MethodsServices = MethodsServices::orderBy('ordre')->get();
28-
$SupplierSelect = $this->SelectDataService->getSupplier();
28+
$CompanieSelect = $this->SelectDataService->getSupplier();
2929
return view('methods/methods-services', [
3030
'MethodsServices' => $MethodsServices,
31-
'SupplierSelect' => $SupplierSelect,
31+
'CompanieSelect' => $CompanieSelect,
3232
]);
3333
}
3434

@@ -40,7 +40,7 @@ public function index()
4040
*/
4141
public function store(StoreServicesRequest $request)
4242
{
43-
$Service = MethodsServices::create($request->only('code','ordre', 'label','type', 'hourly_rate','margin', 'color', 'compannie_id'));
43+
$Service = MethodsServices::create($request->only('code','ordre', 'label','type', 'hourly_rate','margin', 'color', 'companies_id'));
4444

4545
if($request->hasFile('picture')){
4646
$Service = MethodsServices::findOrFail($Service->id);
@@ -66,7 +66,7 @@ public function store(StoreServicesRequest $request)
6666
public function update(UpdateServicesRequest $request)
6767
{
6868
$service = MethodsServices::findOrFail($request->id);
69-
$service->update($request->only(['ordre', 'label', 'type', 'hourly_rate', 'margin', 'color', 'compannie_id']));
69+
$service->update($request->only(['ordre', 'label', 'type', 'hourly_rate', 'margin', 'color', 'companies_id']));
7070
return redirect()->route('methods.service')->with('success', 'Successfully updated service.');
7171
}
7272

app/Http/Controllers/Products/ProductsController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function show($id)
5151
$ServicesSelect = $this->SelectDataService->getServices();
5252
$UnitsSelect = $this->SelectDataService->getUnitsSelect();
5353
$FamiliesSelect = $this->SelectDataService->getFamilies();
54-
$SupplierSelect = $this->SelectDataService->getSupplier();
54+
$CompanieSelect = $this->SelectDataService->getSupplier();
5555

5656
$status_id = Status::select('id')->orderBy('order')->first();
5757
$StockLocationsProducts = StockLocationProducts::where('products_id', $id)->get();
@@ -80,7 +80,7 @@ public function show($id)
8080
'FamiliesSelect' => $FamiliesSelect,
8181
'previousUrl' => $previousUrl,
8282
'nextUrl' => $nextUrl,
83-
'SupplierSelect' => $SupplierSelect,
83+
'CompanieSelect' => $CompanieSelect,
8484
'StockLocationsProducts' => $StockLocationsProducts,
8585
'finalAnalysis' => $finalAnalysis,
8686
]);
@@ -97,7 +97,7 @@ public function StoreSupplier(Request $request)
9797
return redirect()->back()->withErrors(['message' => 'Product not found.']);
9898
}
9999
else{
100-
$product->preferredSuppliers()->attach($request->compannie_id);
100+
$product->preferredSuppliers()->attach($request->companies_id);
101101
return redirect()->route('products.show', ['id' => $request->product_id])->with('success', 'Successfully add supplier.');
102102
}
103103
}

app/Http/Controllers/Purchases/PurchasesController.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function purchase()
8686
$totalPurchasesAmount = $this->purchaseKPIService->getTotalPurchaseAmount();
8787

8888
$userSelect = $this->SelectDataService->getUsers();
89-
$SupplierSelect = $this->SelectDataService->getSupplier();
89+
$CompanieSelect = $this->SelectDataService->getSupplier();
9090

9191
$LastPurchase = Purchases::latest()->first();
9292
//if we have no id, define 0
@@ -109,7 +109,7 @@ public function purchase()
109109
'totalPurchaseLineCount' => $totalPurchaseLineCount,
110110
'totalPurchasesAmount' => $totalPurchasesAmount,
111111
'userSelect' => $userSelect,
112-
'SupplierSelect' => $SupplierSelect,
112+
'CompanieSelect' => $CompanieSelect,
113113
'code' => $code,
114114
'label' => $label,
115115
])->with('data',$data);
@@ -146,9 +146,9 @@ public function storePurchase(StorePurchaseRequest $request)
146146
*/
147147
public function showQuotation(PurchasesQuotation $id)
148148
{
149-
$CompanieSelect = Companies::select('id', 'code','client_type','civility','label','last_name')->get();
150-
$AddressSelect = CompaniesAddresses::select('id', 'label','adress')->where('companies_id', $id->companies_id)->get();
151-
$ContactSelect = CompaniesContacts::select('id', 'first_name','name')->where('companies_id', $id->companies_id)->get();
149+
$CompanieSelect = $this->SelectDataService->getSupplier();
150+
$AddressSelect = $this->SelectDataService->getAddress($id->companies_id);
151+
$ContactSelect = $this->SelectDataService->getContact($id->companies_id);
152152
list($previousUrl, $nextUrl) = $this->getNextPrevious(new PurchasesQuotation(), $id->id);
153153

154154
return view('purchases/purchases-quotation-show', [
@@ -167,9 +167,9 @@ public function showQuotation(PurchasesQuotation $id)
167167
*/
168168
public function showPurchase(Purchases $id)
169169
{
170-
$CompanieSelect = Companies::select('id', 'code','client_type','civility','label','last_name')->get();
171-
$AddressSelect = CompaniesAddresses::select('id', 'label','adress')->where('companies_id', $id->companies_id)->get();
172-
$ContactSelect = CompaniesContacts::select('id', 'first_name','name')->where('companies_id', $id->companies_id)->get();
170+
$CompanieSelect = $this->SelectDataService->getSupplier();
171+
$AddressSelect = $this->SelectDataService->getAddress($id->companies_id);
172+
$ContactSelect = $this->SelectDataService->getContact($id->companies_id);
173173
$PurchaseCalculatorService = new PurchaseCalculatorService($id);
174174
$totalPrice = $PurchaseCalculatorService->getTotalPrice();
175175
$subPrice = $PurchaseCalculatorService->getSubTotal();

app/Http/Controllers/Quality/QualityNonConformityController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function index()
3131

3232
$userSelect = $this->SelectDataService->getUsers();
3333
$ServicesSelect = $this->SelectDataService->getServices();
34-
$CompaniesSelect = Companies::select('id', 'code','client_type','civility','label','last_name')->orderBy('label')->get();
34+
$CompanieSelect = Companies::select('id', 'code','client_type','civility','label','last_name')->orderBy('label')->get();
3535
$CausesSelect = $this->SelectDataService->getQualityCause();
3636
$FailuresSelect = $this->SelectDataService->getQualityFailure();
3737
$CorrectionsSelect = $this->SelectDataService->getQualityCorrection();
@@ -46,7 +46,7 @@ public function index()
4646
'NonConformitysSelect' => $NonConformitysSelect,
4747
'userSelect' => $userSelect,
4848
'ServicesSelect' => $ServicesSelect,
49-
'CompaniesSelect' => $CompaniesSelect,
49+
'CompanieSelect' => $CompanieSelect,
5050
'CausesSelect' => $CausesSelect,
5151
'CorrectionsSelect' => $CorrectionsSelect,
5252
'FailuresSelect' => $FailuresSelect,

app/Http/Controllers/Workflow/LeadsController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public function index()
3737
public function show(Leads $id)
3838
{
3939
$CompanieSelect = $this->SelectDataService->getCompanies();
40-
$AddressSelect = $this->SelectDataService->getAddress();
41-
$ContactSelect = $this->SelectDataService->getContact();
42-
$UsersSelect = $this->SelectDataService->getUsers();
40+
$AddressSelect = $this->SelectDataService->getAddress($id->companies_id);
41+
$ContactSelect = $this->SelectDataService->getContact($id->companies_id);
42+
$userSelect = $this->SelectDataService->getUsers();
4343
list($previousUrl, $nextUrl) = $this->getNextPrevious(new Leads(), $id->id);
4444

4545
return view('workflow/leads-show', [
@@ -49,7 +49,7 @@ public function show(Leads $id)
4949
'ContactSelect' => $ContactSelect,
5050
'previousUrl' => $previousUrl,
5151
'nextUrl' => $nextUrl,
52-
'UsersSelect' => $UsersSelect,
52+
'userSelect' => $userSelect,
5353
]);
5454
}
5555

app/Http/Controllers/Workflow/OpportunitiesController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ private function organizeTimelineData(Opportunities $opportunity, $factory)
211211
public function show(Opportunities $id)
212212
{
213213
$CompanieSelect = $this->SelectDataService->getCompanies();
214-
$AddressSelect = $this->SelectDataService->getAddress();
215-
$ContactSelect = $this->SelectDataService->getContact();
214+
$AddressSelect = $this->SelectDataService->getAddress($id->companies_id);
215+
$ContactSelect = $this->SelectDataService->getContact($id->companies_id);
216216
$Activities = $this->getActivities($id->id);
217217
$Events = $this->getEvents($id->id);
218218
list($previousUrl, $nextUrl) = $this->getNextPrevious(new Opportunities(), $id->id);

app/Http/Controllers/Workflow/OrdersController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public function show(Orders $id)
5656
{
5757
// Retrieve necessary data for dropdowns
5858
$CompanieSelect = $this->SelectDataService->getCompanies();
59-
$AddressSelect = $this->SelectDataService->getAddress();
60-
$ContactSelect = $this->SelectDataService->getContact();
59+
$AddressSelect = $this->SelectDataService->getAddress($id->companies_id);
60+
$ContactSelect = $this->SelectDataService->getContact($id->companies_id);
6161
$AccountingConditionSelect = $this->SelectDataService->getAccountingPaymentConditions();
6262
$AccountingMethodsSelect = $this->SelectDataService->getAccountingPaymentMethod();
6363
$AccountingDeleveriesSelect = $this->SelectDataService->getAccountingDelivery();

app/Http/Controllers/Workflow/QuotesController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public function index()
5050
public function show(Quotes $id)
5151
{
5252
$CompanieSelect = $this->SelectDataService->getCompanies();
53-
$AddressSelect = $this->SelectDataService->getAddress();
54-
$ContactSelect = $this->SelectDataService->getContact();
53+
$AddressSelect = $this->SelectDataService->getAddress($id->companies_id);
54+
$ContactSelect = $this->SelectDataService->getContact($id->companies_id);
5555
$AccountingConditionSelect = $this->SelectDataService->getAccountingPaymentConditions();
5656
$AccountingMethodsSelect = $this->SelectDataService->getAccountingPaymentMethod();
5757
$AccountingDeleveriesSelect = $this->SelectDataService->getAccountingDelivery();

app/Http/Requests/Methods/StoreSectionRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function rules()
2828
'ordre' =>'required|numeric|gt:0',
2929
'code' =>'required|unique:methods_sections',
3030
'label'=>'required',
31+
'user_id'=>'required',
3132
];
3233
}
3334
}

0 commit comments

Comments
 (0)