fix products owneraccont cannot insert accountid_productowner
This commit is contained in:
parent
a552fedca0
commit
41215c1bfb
@ -480,8 +480,8 @@ class Products extends BaseController {
|
|||||||
|
|
||||||
$where = 0;
|
$where = 0;
|
||||||
|
|
||||||
$sql = "SELECT a2.accountname, p.statuspart, ps.productservicetext, p.productid, pc.productname, p.productnumber, p.active, pc.catalognumber, pt.texts as type_name, pc.manufacturer, s.sitename,
|
$sql = "SELECT a2.accountname as owneraccount, p.statuspart, ps.productservicetext, p.productid, pc.productname, p.productnumber, p.active, pc.catalognumber, pt.texts as type_name, pc.manufacturer, s.sitename,
|
||||||
z.zonename as city, z2.zonename as prov, p.installationdate, p.locationstartdate, p.locationenddate, p.warrantystartdate, p.warrantyenddate
|
z.zonename as city, z2.zonename as prov, p.installationdate, p.locationstartdate, p.locationenddate, p.warrantystartdate, p.warrantyenddate, p.productowner
|
||||||
FROM products p
|
FROM products p
|
||||||
left join productcatalog pc on pc.catalogid=p.catalogid
|
left join productcatalog pc on pc.catalogid=p.catalogid
|
||||||
-- left join accoun pc2 on pc2.catalogid=p.accountid_productowner
|
-- left join accoun pc2 on pc2.catalogid=p.accountid_productowner
|
||||||
|
|||||||
@ -5,7 +5,7 @@ use CodeIgniter\Model;
|
|||||||
class ProductsModel extends Model {
|
class ProductsModel extends Model {
|
||||||
protected $table = 'products';
|
protected $table = 'products';
|
||||||
protected $primaryKey = 'productid';
|
protected $primaryKey = 'productid';
|
||||||
protected $allowedFields = [ 'siteid', 'productnumber', 'productname', 'catalogid',
|
protected $allowedFields = [ 'siteid', 'productnumber', 'productname', 'catalogid', 'accountid_productowner',
|
||||||
'installationdate', 'locationstartdate', 'locationenddate', 'warrantystartdate', 'warrantyenddate',
|
'installationdate', 'locationstartdate', 'locationenddate', 'warrantystartdate', 'warrantyenddate',
|
||||||
'productowner', 'productserviceid', 'statuspart', 'active',
|
'productowner', 'productserviceid', 'statuspart', 'active',
|
||||||
'remotetool', 'remoteid', 'remotepwd', 'createdate', 'enddate' ];
|
'remotetool', 'remoteid', 'remotepwd', 'createdate', 'enddate' ];
|
||||||
|
|||||||
@ -36,6 +36,7 @@
|
|||||||
<th scope="col">Product Number</th>
|
<th scope="col">Product Number</th>
|
||||||
<th scope="col">Catalog Number</th>
|
<th scope="col">Catalog Number</th>
|
||||||
<th scope="col">Product Owner</th>
|
<th scope="col">Product Owner</th>
|
||||||
|
<th scope="col">Owner Account</th>
|
||||||
<th scope="col">Status Service</th>
|
<th scope="col">Status Service</th>
|
||||||
<th scope="col">Status Parts</th>
|
<th scope="col">Status Parts</th>
|
||||||
<th scope="col">Type</th>
|
<th scope="col">Type</th>
|
||||||
@ -59,7 +60,8 @@
|
|||||||
<td><?= htmlspecialchars($item['productname'] ?? '') ?></td>
|
<td><?= htmlspecialchars($item['productname'] ?? '') ?></td>
|
||||||
<td><?= htmlspecialchars($item['productnumber'] ?? '') ?></td>
|
<td><?= htmlspecialchars($item['productnumber'] ?? '') ?></td>
|
||||||
<td><?= htmlspecialchars($item['catalognumber'] ?? '') ?></td>
|
<td><?= htmlspecialchars($item['catalognumber'] ?? '') ?></td>
|
||||||
<td><?= htmlspecialchars($item['accountname'] ?? '') ?></td>
|
<td><?= htmlspecialchars($item['productowner'] ?? '') ?></td>
|
||||||
|
<td><?= htmlspecialchars($item['owneraccount'] ?? '') ?></td>
|
||||||
<td><?= htmlspecialchars($item['service'] ?? '') ?></td>
|
<td><?= htmlspecialchars($item['service'] ?? '') ?></td>
|
||||||
<td><?= htmlspecialchars($item['statuspart'] ?? '') ?></td>
|
<td><?= htmlspecialchars($item['statuspart'] ?? '') ?></td>
|
||||||
<td><?= htmlspecialchars($item['type_name'] ?? '') ?></td>
|
<td><?= htmlspecialchars($item['type_name'] ?? '') ?></td>
|
||||||
@ -91,8 +93,8 @@ function exportToExcel() {
|
|||||||
XLSX.writeFile(wb, "ProductsList.xlsx");
|
XLSX.writeFile(wb, "ProductsList.xlsx");
|
||||||
}
|
}
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
document.getElementById('saveButton').click();
|
document.getElementById('saveButton').click();
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user