-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inventory Item Label to print one label per unit of each item received
- Loading branch information
1 parent
e3dac21
commit 21d33a1
Showing
9 changed files
with
1,202 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Graph ClassName="PopulateUsrNumbers" Source="#CDATA" IsNew="True" FileType="NewFile"> | ||
<CDATA name="Source"><![CDATA[using System; | ||
using PX.Data; | ||
using Customization; | ||
namespace PXInventoryLabelReportExtPkg | ||
{ | ||
//Customization plugin is used to execute custom actions after customization project was published | ||
public class PopulateUsrNumbers : CustomizationPlugin | ||
{ | ||
//This method executed after customization was published and website was restarted. | ||
public override void UpdateDatabase() | ||
{ | ||
//Where 1000 could be max possible value for unit per item - adjust as per your need | ||
int iNumberOfLabels = 1000; | ||
UsrNumbers usrNumberMax = PXSelectGroupBy<UsrNumbers, Aggregate<Max<UsrNumbers.number>>>.Select(new PXGraph()); | ||
if (usrNumberMax != null) | ||
{ | ||
for (int i = (usrNumberMax.Number.GetValueOrDefault(0) + 1); i <= iNumberOfLabels; i++) | ||
{ | ||
PXDatabase.Insert<UsrNumbers>(new PXDataFieldAssign<UsrNumbers.number>(i)); | ||
} | ||
} | ||
} | ||
} | ||
}]]></CDATA> | ||
</Graph> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Graph ClassName="UsrNumbers" Source="#CDATA" IsNew="True" FileType="NewFile"> | ||
<CDATA name="Source"><![CDATA[using System; | ||
using PX.Data; | ||
namespace PXInventoryLabelReportExtPkg | ||
{ | ||
[Serializable] | ||
public class UsrNumbers : IBqlTable | ||
{ | ||
#region Number | ||
[PXDBInt(IsKey = true)] | ||
[PXUIField(DisplayName = "Number")] | ||
public virtual int? Number { get; set; } | ||
public abstract class number : IBqlField { } | ||
#endregion | ||
} | ||
}]]></CDATA> | ||
</Graph> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project name="PXInventoryLabelReportExtPkg" level="0" description="" /> |
Oops, something went wrong.